This article will walk you through how to create timestamped website back-up of your website on the Grid.
READ ME FIRST
This article is provided as a courtesy. Installing, configuring, and troubleshooting third-party applications is outside the scope of support provided by (mt) Media Temple. Please take a moment to review the Statement of Support.
- Decide which domain you want to back up then go to that directory.
- Use VI or VIM to create a new file named 'backup.sh':
- Add the following information into the file, replacing the placeholders with your domain, and then save:
#!/bin/sh cd ~/domains/example.com zip -r backup`date '+%Y-%m-%d'`.zip html/*
- Run a command which will make the file executable by you, the owner:
chmod 744 backup.sh
- Just to make sure it works, test it out:
- You should see lines appearing on the screen as each file and folder is added to the archive. They will look something like this:
adding: html/Media.php (deflated 24%) adding: html/Temple.txt (deflated 61%) adding: html/Totally.ico (deflated 44%) adding: html/Rocks.mp3 (deflated 68%) adding: html/Yay/Media/Temple.html (deflated 51%)
- When you perform a list directory command (ls), you should see a file called "backup08.02.10.zip", or whatever is the corresponding date. So now that we have a working script, it's time to make a regularly occurring job out of it.