Gzip - tar my entire site

how can i gzip / tar my entire website via ssh (all folders and files)
noob to ssh. just want to do a monthly backup


look at this link first - I describe how to set up an automagic backup of your front page site. Everything execpt the actuall backup of the front page site will also apply here. For actually carrying out your backup, just replace the fp.sh script I use there with this:

suffix=$(date +%y%m%d)
cd /home/username/.snapshot/nightly.0/
tar -cf /home/username/backups/archives/Doamin.$suffix.tar domain.com/

That will create a tar file called domain.200051213.tar (inserting the current date everytime the script is run) You’ll obviously have to change all of the paths and whatnots to reflect your paths.

I also now see that I failed to mention in the post I link to, that the example I use for the cron tab will run at 2:30 am every thursday.

Let me know if I need to explain anything more clearly, or if it’s not working for you.


thanks alot :slight_smile:

tar can run gzip on the archive to make it smaller, if you use the -z option. This would make the tar command:

tar -zcf /home/username/backups/archives/Domain.$suffix.tar.gz domain.com/