Backup Strategy

Permalink
Being new to C5 (or any other DB based CMS), I'm in need of some help / advice with deciding on a backup strategy. I'm working on a site for a non-profit org, hosted on a low-budget shared host. I can easily download the entirety of the current static site for backup purposes. Restoration would be simple.

After trying to get up to speed on methods of backing up MySQL dumps and archiving all the places where C5 customization happens, I'm now thinking my need may already be solved. My host offers daily backups (said to be storage attached to my server but in another enclosure) all of my public/html and MySQL DBs. It allows restoration at the folder, file and DB level. I'm thinking this would allow a complete restoration if needed and it happens automatically. Does this sound adequate? Am I missing something?
Thanks
Shawn

 
JohntheFish replied on at Permalink Reply
JohntheFish
That protects you from hardware failures on the server. But will it protect you from problems or mistakes you make with the software? Will they do a selective recovery for you?
srk replied on at Permalink Reply
It looks like I can do selective restoration down to the file level - but I'm not sure about history depth. I think I would want some number of versions (backup dates) to revert to. Correct?
JohntheFish replied on at Permalink Reply
JohntheFish
Just as important, if not more so with a CMS, is database backup. Because of the interrelationships, unless you are a real sql ninja this is usually an all or nothing dump. How often depends on the nature of your site. For a site with frequently changing content (eg commerce, forums, events, calendars) you need at least daily. For a site that once live is fairly static, you can be a bit more relaxed.
JohntheFish replied on at Permalink Reply
JohntheFish
Here are some instructions I put together a few months ago for a customer on making database backups using phpMyAdmin.....

>>>>>>
The official way to do database backups is by going to Dashboard > System & Maintenance > Backup & Restore, clicking the button to Run Backup, then downloading the file. This may run out of server time (500 error) if the Page Statistics and Log tables have grown too big.

First, you could turn off Page Statistics, delete the table and clear the Log table. This may enable the C5 backup to run without getting a 500 error.

An alternative method is to use phpMyAdmin, which enables direct manipulation of the database, so is very very dangerous to play with.

- Select your database.
- On the first phpMyAdmin page, click the red 'Export' link.
- The next page is a form with export options. Close to the top is a text box "Add custom comment into header". Make a note in this about what your backup is.
- In the group 'Structure' check 'add Drop Table'. Leave the other checkboxes alone, as the default.
- Check 'save as file' on the blue line near the bottom
- Select 'zipped' on the radio buttons
- click 'GO' and then save the file on your PC. Insert the date into the filename.

Now close the phpMyAdmin browser tab

In a worst case, this file can be used to restore the database using phpMyAdmin to import the file.
<<<<<<<

PS. Have just turned this into a how-to with a few screen grabs. http://www.concrete5.org/documentation/how-tos/developers/backup-a-...
srk replied on at Permalink Reply
John,
Thanks for the detailed instructions and I look forward to a how-to. I'll file this in my own cheat-sheet/reference docs. I've played with backing up from the dashboard but my DB is very small. I assume I won't have to worry about server time-outs running the export on phpMyAdmin.

I'm still tempted to rest on my host's daily backups because I think manual backups will eventually get neglected. If I'm thinking right, I'll always be able to roll back the entire site to the way it was yesterday (or last week or whenever) since all files and DB are both covered. I think that would be adequate for my organization. My concern (and I'll have to research with my host) is if they don't keep more than one daily backup, and I miss detecting a problem for more than a day... the last good backup would be bad.
I appreciate the help.
Shawn