Actions

Website Backup using tar

From zen2

Revision as of 08:45, 25 July 2013 by Chris (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Navigate to the folder you want to backup and type

tar -cf mybackupfilename.tar .

This will create a tarball of your site

Then type

gzip -9 mybackupfilename.tar

This will compress the tarball and rename it with a .gz extension.

Then ftp (or better yet, scp) the file to your backup hardware.

Reverse the process by moving the file to the directory from whence it came

gunzip -9 mybackupfilename.tar.gz
tar -xf mybackupfilename.tar