Archive for March 30th, 2006

How to Backup a Website on Unix

Marc-Antoine Ross March 30th, 2006 Add comment

I am always searching and searching for the same shell commands. I don’t use them often enough to remember them. Here’s one to backup your whole site directory into one archive file:

tar -cvzf ~/$(date ’+%F_%H%I%S%P’).tgz ~/domain.com/

This will backup the whole folder “domain.com” into an archive. The filename will include a timestamp, which is quite useful!

Schedule

March 2006
M T W T F S S
    Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031