Professional Documents
Culture Documents
Absolute Paths
When restoring files backed up with the backup, cpio, or tar commands, find out FIRST whether
RELATIVE or ABSOLUTE pathnames were used BEFORE the restore is initiated. We recommend
using RELATIVE.
• Relative pathnames will have a ./ pre-fixed to their path. These files will be restored relative to
the current directory.
• Absolute pathnames won't have the ., just the /. These are restored with the full pathname to the
exact directory as specified on the archive device.
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.
Backup finished on Sat Aug 1 15:22:34 CDT 1992; there are 8700 blocks on 1 volumes.
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
top of page
Utilities to compress or expand data. The compress command reduces the size of the named file(s) and
renames it with a .Z extension. Compressed files can be restored to their original form using the
uncompress command. This utility appears to have a more EFFICENT packing scheme than the
PACK/UNPACK commands.
top of page
cpio
Copies files to/from an archive storage device. This command is often used to copy files from UNIX to AIX
systems. This command will span across multiple tapes. cpio stands for CoPy Input to Output.
-C1 Performs block I/O in 512 byte blocks, if the block size of the device that wrote the data on the tape
was set to 512 bytes. Make sure you read with the same block size. If the block size that the data
was written to and about to be read from are two different sizes, this message will be displayed:
Cannot read from the specified device
top of page
dd
Converts/copies files to/from an output device. DD stands for Data Dump. This command will NOT span
across multiple tapes. Common utility found on most versions of UNIX.
dd if=/dev/rmt0.1 Will read a record size of 147 bytes, a block size of 2940 bytes, and convert
of=/tmp/data1 cbs=147 the output to an ASCII file.
ibs=2940 conv=ascii
top of page
mksysb
High-level shell command for backing up mounted file systems in the rootvg volume group. mkszfile -f
must be called prior to mksysb in order to create the /.fs.size file that mksysb uses to determine which files
will be backed up.
An 8mm tape drive is the preferred method of backing up your system because that tape can be used to
recreate the rootvg image if one or more physical volumes fail. Each of the file systems MUST have at least
500 blocks free when the mksysb backup is made. The system will need some work space in each file
system when it is installing from a mksysb backup.
MKSYSB can create a BOOTABLE tape. Further, the data is archived in TAR format. In order to look at the
names of files backed up by this command, perform the following:
restore
Retrieve information from archive device created with the backup command. Default device is /dev/fd0.
This command will read a backup image spread across multiple tapes.
top of page
tapechk
Performs consistency checks on a tape device. Primarily used to check tapes written in backup format.
Example: tapechk 2 ( Checks the first 2 files found on the tape device.)
top of page
tar
Probably the easiest command to use when transferring files from one UNIX system to another. This
command will NOT span across multiple tapes. Tar stands for Tape ARchiver.
When using this command while performing a SELECTIVE restore from a tape device (eg;., tar -xvf/dev/rmt0
./etc/motd), the tar command will continue to run until the end of tape is encountered, even after the file has
been found. The error message tar: directory checksum error (0 != 12345) Tar is an older utility than
cpio or backup/restore is generated when an attempt is made to extract a file that is NOT in tar format.
top of page
tcopy
Copies from one magnetic tape device to another. This command will work for copying multiple backup
images from one media type to another. It will continue to copy until two end-of-tape marks are encountered.
top of page
tctl
top of page
The local host MUST be included in remote's hosts /etc/hosts.equiv file. The local host and user name
MUST be included in the $HOME/.rhosts file at the user account at the remote machine.