Articles: Backup your files using tar and gzip

Posted by: david on 01/08/2003 - 01:12 AM

The following command backs up the foobar directory into a file called foobar.tgz:

  tar cvf - /home/foobar | gzip > /home/backup/foobar.tgz
With the newer versions of the GNU tar the above can be shortened to:

  tar cvfz /home/foobar /home/backup/foobar.tgz



Here is a video that demos how you would goes into more detail, as well as setting up the back-up task using cron.