Securing-Optimizing-RH-Linux-1_2_455
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
455
The above command extracts all files contained in the compressed archive, preserving original
file ownership and permissions.
The x option stands for extract.
The p option preserve permissions; file protection information will be remembered.
The f option states that the very next argument will be the name of the archive file or device.
If you do not need to restore all files contained in the archive, you can specify one or more files
that you wish to restore:
·
To specify one or more files that you wish to restore, use the following command:
[root@deep]# cd /
[root@deep]# tar xpf /dev/st0/full-backup-Day-Month-Year.tar \
home/wahib/Personal/Contents.doc home/quota.user
The above command restores the /home/wahib/Personal/Contents.doc and /home/quota.user
files from the archive.
·
If you just want to see what files are on a backup volume, Use the --list (-t) option:
[root@deep /]# tar tf /dev/st0
Caution: If you have a files on your system set with the immutable bit, using the chattr
command, these files will not be remembered with the immutable bit from your restore backup.
You must reset it immutable with the command chattr +i after the backup is completed.
Test the ability to recover from backups
For many system administrators, recovering a file from a backup is an uncommon activity. This
step assures that if you need to recover a file, the tools and processes will work. Performing this
test periodically will help you to discover problems with the backup procedures so you can correct
them before losing data. Some backup restoration software does not accurately recover the
correct file protection and file ownership controls. Check these attributes of restored files to
ensure they are being set correctly. Periodically test to ensure that you can perform a full system
recovery from your backups.
Further documentation
For more details, there is man page you can read:
tar (1) - The GNU version of the tar archiving utility
The dump backup program
Description
Dump is completely different from tar; it is a program for backing up and restoring file system. It
backups up the entire file system - not the files. Dump does not care what file system is on the
hard drive, or even if there are files in the file system, it examines files on an ext2 file system,
determines which ones need to be backed up, and copies those files to a specified disk, tape, file
or other storage medium. It dumps one file system at a time, quickly and efficiently. Unfortunately,
it does not do individual directories, and so, it eats up a great deal more storage space than tar. It
is also written specifically for backups. The restore command performs the inverse function of
dump; it can restore a full backup of a file system. Subsequent incremental backups can then be