How to create a tar gzip backup of your websites files and folders mac terminal

June 15, 2009

Simply use the following command:

Firstly cd into the directory you want the backup to go into so cd /sites/backups/

tar cvfz backupname.tar.gz /sites/yoursite.com/http

This will create a backup up of your entire site and put it into the current folder you are in.

You can see the backup in the folder after running the command simply by "ls"


About me

Hello! I'm David Heward, how are you going? I'm a Senior Devops/Build Engineer, specialising in AWS & Cloud Automation. Based in London. Strong 10+ year background in Software development. Have a read of my blog. Have a look at some of my working projects. Contact me at @davehewy or on Linkedin.