Wednesday, January 5, 2011

back up in AIX

backup
Command typically used to backup files on an AIX platform. Distribution tapes for AIX are in this format. This command will span across multiple tapes.
Backup by INODE is not recommended because it eliminates the capability to selectively restore files by filename.
If you have more data to backup than can fit on one tape, you will probably want to perform INCREMENTAL backups for files that have been modified within the last 24 hours for each day of the work week, followed by making a complete backup of the system on the weekend.
The error message Volume on /dev/rfd0 is not in backup format is generated when an attempt is made to extract a file NOT created by the backup command:
If your backup was successful, the last item logged by 'backup' is the time the backup finished and the number of 512 byte block that were archived.

Options What it does
-i Read standard input
-v List names of files being backed up
-f Name of output device (typically de/v/rmt0 for tape drive)
-e Won't attempt to compress or pack files that are greater than 24 MB.
-q Won't prompt user to insert tape
-p Pack data. Backup images by default are NOT packed. If you wish to pack your data, use this option. The restore command has enough intelligence to determine if a backup image is packed or not and take appropriate action


Examples What it does
find /u -print | backup -ivf/dev/rmt0 Backup the file system /u to tape device using ABSOLUTE pathnames.

find . -print | backup -iepqvf/dev/rmt0 | tee /tmp/BACKUP.LOG

Backup files and directories under current directory (.) using RELATIVE pathnames. The tee (|) will take as input the output of the backup command (filenames being copied) and write them to the log file 'BACKUP.LOG' for later review.


find /faxdata -mtime -1 -type f -print | backup -ivf/dev/rmt0.1 Find any REGULAR files (-type f) that have been modified within the past 24 hours (-mtime -1) and write them to the tape device but don't rewind (/dev/rmt*.1) the tape after backup has finished.


backup -ivqf/dev/fd0 Backup files interactively. Select the file(s) to backup by typing in the file's name. When done, press ^D to finish.
find / -print|backup -icvqf/dev/rmt0-1 If there is more than one tape drive attached to the system, then you can specify a range of devices to the -f flag of the backup command. (/dev/rmt0-1)

No comments:

Post a Comment