Monday, January 3, 2011

Linux tape drive backup completely Raiders

Second, the introduction of tape storage tape storage is a fairly broad range of areas, including LTO, DDS, DAT, DLT, SDLT, etc.

Decades of various tape has become a traditional backup media. Table 1 is the tape technology list: tape type tape capacity minimum life DAT tape 4mmDDS4GB (120 m DDS-2) 3-4 years 12GB (125 m DDS-3) 3-4 years 20GB (150 m DDS-4) 3-4 years 8mmtape7GB (160 m) 2-4 years Mammoth-2 (AME) 20GB3-4 years 60GB3-4 years, AIT tape 35GB3-4 years 50GB3-4 years 100GB3-4 years DLT40GB10 chronology 1 Introduction Note: tape technology and the use of DDS-4 DDS-3 technology and earlier versions. Latest tape drive supports most major tape, but most drives provide read-only for backward compatibility. 3. tape management commands from the user's perspective, Linux any device can be seen as a file. Therefore, you can "open" the appropriate tape drive file write operations are to be backed up data is written to a file. Although it sounds too simple, but the actual situation is like this. Unix system for each device as a file, and dealt with as ordinary files, so you can make the files and equipment operation possible reunification. From the user's perspective, the equipment used and the file will be used. So the most effective management tape is to use the associated command. 1.tar command tar command is used to build, restore the backup file of the utility, if you want to under certain basic principles of using tape instead of a hard disk data backup, you have several options. The most common procedures are tar, most UNIX class also contains the program. The following describes how to use GNUtar for some simple backup. If you just want to tape backup system, this is it powerful. You can also use rsync from several systems make a copy of the file, and then use the tar package data to tape. The following examples are based on the following three assumptions: ●/home/directory being backed up. Simply place a slightly modified to specify a different directory or multiple directories. ● Tape drive via a device file/dev/st0 access. If there is only one Linux SCSI tape drive, the correct device file is/dev/st0. If this is not the case, you need to use the appropriate device file to match the hardware device. • This article using a free insurance data (TANDBERGDATA) latest half-height tape drive adopts LTOUltrium2 applies to half-height tape drive read 5.25 tape speed to 48MBps, compressed capacity up to 400 GB. As figure. Figure half-height tape drive ● LTOUltrium2 script execute as root, the current working directory is the root (/). Use tar to basic backup to use tar on the tape to create a full backup, you can run the following command: # tarcvpf/dev/st0ome option c mean is you should create a new archive; option v mean adding the file should be in the archives of both of these files; option p mean all permissions should be retained; option f means that the file should be written to a file (/dev/st0, it actually represents your tape drive). Use tar to create incremental backup to create a simple incremental backups, you can use GNUtar the-n option, it allows you to specify a date and only after that date are created or modified files will be included in the archive. Suppose a backup every day, you can use the following command makes an incremental backup: # tarcpf/dev/st0-N "$ (date-d'1dayago ') ome this script can perform all backups: #!/bin/bas # Wheretoplacebackuplogfiles LOG_DIR ="/usr/local/var/backup_logs "# Whichdirectoriestoincludeinbackup DIRS =" ome "# Whichoutputfileortapedevicetouse DEV ="/dev/st0 "today = $ (date +% a) cd/case $ todayin Mon) # Fullbackup tarcvpf $ DEV $ DIRS mt-f $ DEVrewind mt-f $ DEVoffline;; Tue|Wed|Thu|ri)  #Partialbackup  tarcvpf$DEV-N"$(date-d'1dayago')"$DIRS  mt-f$DEVrewind  mt-f$DEVoffline  ;; *)  #Weekend,donoting  ;; Assuming that the backup script to execute every morning, you can run the script every day after replacement of the tape. In this way, you can always change tomorrow today for backup tape.

No comments:

Post a Comment