Summary of various effective backup methods in Linux
Source: Internet
Author: User
Article Title: a summary of various effective backup methods in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Backup on a single server The most common backup method is to use the classic backup program tar on the command line. is the most common, simple, and useful backup tool # tar cvf backup.tar/etc (back up the entire etc directory and all the subdirectories and files below) # gzip-9 backup.tar (get the maximum compression rate)
You can transfer backup.tar.gz to other media, CDR/CDRW, private mailbox, etc.
Ii. Cross-server backup 1. Use the ssh/scp function to directly copy files or directories from one server to another. See another article titled how to use ssh/scp without a password.
2. Use smbmount to first mount the Samba shared directory on the other server to a directory on the machine and perform cp operations directly. For example: [root @ sh/mnt] # smbmount // sh3/pub/mnt/sh3-N mount the Samba shared directory on server sh3 pub to the/mnt/sh3 directory on server sh below. No password prompt
3. Using NFS to back up data between servers has certain program security issues. I will not discuss them here.
3. Back up data to other media You can back up the data to tape, ZIP drive, and JAZ drive.
1. Back up to tape
Assume that you have configured and installed the tape drive, and you are using the HP SuitStore 500, external, and SCSI interfaces.
1. view the directory tar tvf/dev/st0 in the tape.
2. view the tape content and output it to a file. tar tvf/dev/st0> stlist
3. Backup File tar cvf/dev/st0/etc
Tar cvf/dev/st0/etc/hosts/boot/etc/smb. conf
4. Release the corresponding files on the tape according to the specified file content or directory
Tar-T stlist-xvf/dev/st0
Tar xvfz/dev/st0/etc/
6. append individual files to the back of the tape
Tar-r/etc/hosts/etc/passwd-vf/dev/st0
7. delete one or more files from an existing tape
Tar -- delete etc/hosts-vf/dev/st0
8. attach an existing tar document to the back of the tape
Tar-A pamd.tar-vf/dev/st0
2. Back up to the JAZ drive
7.3 Getting a Zip drive to work
(See Redhat FAQ: href = "http://www.redhat.com/support/docs/faqs/rhl_general_faq/FAQ.html" target = "_ blank"> http://www.redhat.com/support/docs/faqs/rhl_general_faq/FAQ.html)
There are excellent references in the ZIP HOWTOs at href = "http://www.redhat.com/mirrors/LDP." target = "_ blank"> http://www.redhat.com/mirrors/LDP.
In Red Hat Linux 6.1, there are a few extra steps needed to get a parallel port Zipdrive to work:
Edit your/etc/conf. modules and add:
Alias parport_lowlevel parport_pc
Alias scsi_hostadapter ppa
Then log in as root and run:
Modprobe ppa
Some people have had problems if they daisy chain a Zip drive off of a chain with a printer on it. Currently, we recommend that you use either the printer or the Zipdrive.
For more information, check target = "_ blank"> www.torque.net/paraport
If you are having problems with an IDE Zip drive, here is further information:
First check and make sure there is a disk in the drive. also, make sure you aremounting it as partition 4 instead of 1. an example wocould be hdc4. The reason for this is thatthe Macintosh uses partition 4 for its data partition and has problems if data is on another partition.
3. Back up data to the JAZ drive
Assume that the JAQ drive is a SCSI interface and the JAZ drive is used as a storage device on the SCSI chain.
4. Backup across operating systems 1. back up data on a Linux server to a windows 95/98 server. Assume that jephe has a full read/write shared directory data and the password is secret, if you want to back up files on Linux to this shared directory, mount the shared writable directory to Linux and then perform common cp operations.
(Http://www.pcquest.com/linux/netware.asp) NetWare And Linux
Making your Linux server talk to NetWare servers and printers
As almost every office-LAN has a NetWare server, your desktop client must be able totalk to NetWare. this article tells you how a Linux box can access files on a Novellserver and print to a Novell print queue.
Linux, by default, uses the IP network protocol for network communication. however, Novell NetWare uses the IPX network protocol. as the Linux kernel has a completely newnetwork implementation compared to other operating systems like Unix, it supports a range of non-TCP/IP protocols including the IPX protocol. kernels 2.x onwards have built-in IPX support. the Red Hat Linux distributed on our CD-ROM has it too. the Linux kernelsupports the IPX protocol only. it does not, yet, support protocols such as IPX/RIP, SAP, orNCP.
The first step is to configure your IPX interfaces.
Login as root
Type ipx_configure -- auto_primary = on -- auto_interface = on
Wait for a minute and type cat/proc/net/ipx_interface. You shoshould see something like:
Network Node_Address Primary Device Frame_Type
201700e1 00A0C925164A Yes eth0 802.2
4. Type slist. You shocould see a list of the NetWare servers on your LAN.
Known NetWare File Servers Network Node Address
D74_SERVER 00000D74 00000000001
If you don't, wait for a few minutes and retry. If the slist command displays amessage like: ncp_connect: Invalid argument, then your kernel probably does not support IPX.
Check that you have actually booted off the appropriate kernel. when you boot youshocould see messages about IPX and ncpfs in system startup messages. if the slist commanddoes not list all of your fileservers, then you may need to use the manual networkconfiguration method. type cat/proc/net/ipx_interface. you shoshould see something like:
At this point, your Linux box is setup for IPX networking. check if your kernel has support for NetWare NCP file system. the default Red Hat kernel has NCP file system support. you simply have to load the ncpfs module/usr/sbin/lib/modules/2.0.32/fs/ncpfs.0.
You can also add the line to your local file to load it automatically at the boottime.
Once that is done
Login as root (only root can mount NetWare volumes ).
Type mkdir/netware to create a directory for mounting the NetWare volumes.
Type ncpmount-S D74_SERVER-U user10/netware. You will be prompted for a passwordfor user10.
At this point your server is mounted on/netware. the volumes are sub-directoriesunder/netware. so the SYS volume wocould be/netware/sys and the DATA volume wocould be/netware/data.
If you only want to mount a single volume, you can use ncpmount-S D74_SERVER-V sys-U user10/netware. This will mount only the SYS volume to/netware.
When you finish using the Net-Ware volume, you can unmount usingncpumount/netware.
Tip: You don't need to manually unmount NetWare volumes when you shutdown.
When you want to share the mounted NetWare volume among other Linux users, you need to understand file permissions. the NetWare file system doesn't support user IDs andgroup IDs for directories. so all files and directories on the mounted directory have the permissions as the directory where it was mounted. for example, if you type ls-ld/netware, drwxrwxr-x 1 root 512 Nov 24 1960/netware is what you get.
So, all the NetWare files will have the above file permissions.
If you want non-root users to mount NetWare volumes, ncpmount command must be SetUserid Root, so you wowould need to type chmod 4755 ncpmount
Simplifying mounting of volumes
There is another way of processing ing NetWare mounts-by creating. nwclient file inyour home directory. this file contains details of temporary or user specific NetWare mountsthat wocould be specified med regularly. it allows you to store the details of mounts so that you canrecreate them without specifying all details each time. its format is quite straightforward:
# The first entry is the 'preferred Server' entry and is
# Used whenever you do not specify a server explicitly.
#
# User USER01 login to D74_SERVER files
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.