Help hurricane victims by donating to the American Red Cross.

Backup

From Ollie's Web Site

Contents

Backup Approaches

Tar

tar -cvf tarname files

- creates tar named "tarname" and adds "files"

tar -xvf tarfile.tar

- extracts verbose files from tar

Examples:

  $ tar -cvf /dev/rmt0 /bin /usr/bin: archives contents of /bin and /usr/bin (verbose) to tape drive
  $ tar tvf /dev/rmt0: list the tape's contents in a format like "ls -l"
  $ tar xvf /dev/rmt /bin: extract the /bin directory
  $ tar cvf - `find . -print' > backup.tar: create an archive of the current directory and store it in a file, backup.tar

- (the "-" tells tar to store the directory on standard output, which is then redirected)

  $ tar -cvf libjpeg.tar libjpeg*: puts files ./libjpeg* into tar named libjpeg

Note: the -z option gzips or gunzips the output.

See full and incremental backup scripts in tucker:/var/www/

Click here for full info tar