Backup _unix Linux in Linux environment

Source: Internet
Author: User
Tags zip

One of the questions that Linux system administrators often ask is: how do I back up my system? For Windows systems, it's easy to do backups (just click the Mouse in menu mode to do it). Linux backup work is much more cumbersome, and if you are unfamiliar with Linux system files and devices, things can get worse. This article discusses the methods of protecting data and related device information in a Linux environment.

1, what is backup? In the simplest sense, the process of backing up data is to copy important data onto other media (usually removable) to ensure that the data is recoverable if the original data is lost. One backup may be a simple CP command, copying a file to another directory, or a complex process that uses a specific program to write data into a particular device. In many cases, the data to be backed up is written to the tape drive, but not in some cases. In a Linux environment, or other UNIX systems, backups can be a copy of files to an existing file system, replaceable file systems, tape drives, remote file systems, or even a tape drive on a remote system. Of course, from a user's point of view, there is no concept of a tape drive or a ZIP driver, but just a file.

2. What kind of backup device should you choose?

There are many devices on the market that claim to be "perfect system backup choices", including tape drives, portable disk drivers, and even mysterious Internet backup systems. For backup operations, the tape drive provides the most trusted way to store. Why the tape drive? Of course, the Iomega Company's Jaz or zip drives appear to be interesting backup tools, but they are easy to cause problems with the file system because of the crash of the hard drive. For Internet backup, you cannot recover the system's data when you are unable to access the Internet because of a system crash. Similarly, can you really trust your data to be stored in someone else's remote system? So we chose the tape drive, but how do we access the tape drive? As mentioned earlier in the article, in a Linux system, in the context of a user's state, anything can be viewed as a file. Therefore, you can "open" the appropriate tape drive file for write operations, and write the data to be backed up to the file. This may sound too simple, but that's the way it is. The dev directory of the root file system in the Linux environment contains all the files associated with the physical device. When these files are operated on, they are actually operating on the underlying physical device. The following table illustrates how device files are associated with physical devices in a Linux environment: device (Device) rollback (rewinding) not rolled back (No-rewind)
1st SCSI Tape Drive/dev/st0/dev/nst0
2nd SCSI Tape Drive/dev/st1/dev/nst1
Nth SCSI tape drive/dev/st[n-1]/dev/nst[n-1]
1st ATAPI Tape Drive/dev/ht0/dev/nht0
2nd ATAPI Tape Drive/dev/ht1/dev/nht1
Nth ATAPI tape drive/dev/ht[n-1]/dev/nht[n-1]
1st floppy tape drive/dev/ft0/dev/nft0 as seen in the table above, the device name is based on the logical number of the device that is in the hierarchy for this device type, not its physical ID (SCSI) or IDE channel (ATAPI). Therefore, even if a SCSI disk drive is assigned to a SCSI device ID4, it will be/dev/st0 rather than/dev/st4 if it is the first tape device in the SCSI chain, which is useful for tracking tape devices in the system, even for tape devices that have multiple drive types. Similarly, under the 2.0.X kernel, only a single ATAPI device is supported, and a 2.2-version kernel can use multiple ATAPI drivers (ht0, ht1,...).

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.