RedhatLinuxSysAdmin 





Configure Linux Components   «Prev  Next»
Lesson 4The tar tape backup command
ObjectiveUse the tar command to back up and restore files and directories.

tar Tape Backup Command to restore Files and Directories

The tar command is used to create archives and extract files and directories from tar archives. You can use tar as an expedient and simple method for storing an entire file system. You can then use the tar file as a backup, or you can transfer and extract the file onto another machine. tar is very useful for generating daily backups of critical files (such as a current project) or for archiving data, such as mail for an entire organization.
tar "flattens" files and directories into sequential archives that can go to tape or disk. Linux supports standard commands for tape backup, including:
  1. c: Create an archive
  2. x: Extract files and file systems from a tar archive
  3. z: Use gzip compression
  4. f: Specify the file system on which to store the archive

The following SlideShow illustrates some examples.


linux-tar-commands
qc44
The next lesson examines the use of the dump command.