System Backup and the tar Archiving Utility
There are several commands, which can be used to back up data on the system, the tar command is the only one that will be covered here. The tar command can create an archive file of a directory or directories, compress it, and write it to a single file either on the existing file system or to back up media such as a tape drive. By designing a script file with the backup process, the backups could be scheduled to run on a regular basis using the cron system. Although there are GUI based utilitys that can assist, the system administrator can easily design a script program and customize it to the fit their needs.
The basic form of this command is:
tar [options] archivename directory1 [directory2, directory3, ... ]
Options for creating an archive would be -czf, c instructs tar to create new archive, z to compress it using gzip , and write it to archivename (which could be a local file or a remote file or a tape device).
A restore would simply be the reverse using the command:
tar [options] archivename
Where the options that would reverse the proceeding example would be: -xzf. This would restore the data into a directory name that matched the name of the directory that was backed up.
When creating tar files, if absolute directory names are used to point to the directory to be tarred the backup the restore process will restore data back into that original directory, potentially over-writing the contents of that directory. Using relative paths in creating the archive will allow the administrator to restore the archive into a separate directory and then select what files would actually be copied into the final directory.
Home - Table Of Contents - Contact Us
CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005
Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.