Protected Data

December 2nd, 2009

Region capture 1

 

How is your website protected?  Does your web developer or host create daily/weekly/monthly backups of your site files and database?  Typically clients don’t tend to ask these questions until the damage is already done.  It’s good to ask sooner rather then later.

 

Our hosting partner Rackspace, does perform daily backups, but only saves that data for 3 days.  We extend this protection by providing daily/weekly/monthly backups for all our site using a simple perl script.  When you see how simple it is you will implore your developer to implement a similar script.

 

Ready?  Here’s the quick explanation…

 

Line 2 – Sets up the timestamp for use in file names

Line 3 – Gets a MySQL dump of the database content and saves it

Line 4 – Compresses the MySQL dump file

Line 4 – Copies the full web content directory, compresses the files, and saves it

Line 6 – Finds backups that are older more then 7 days ago and deletes them.

 

This script will keep daily backups for a week and then automatically delete the older files. Pretty neat huh?

 

So the next time you have your web developer on the phone make sure you ask them about how your site is being backed up and refer him to this post for a simple perl script to do just that.

 

Happy Surfing!

Leave a Reply

Comments:

 
© 2010 Floodlight Design. All Rights Reserved.