Andy Milk Interactive

Web site design and application development
  • rss
  • Home
  • About
  • Portfolio
  • Clients
  • Skills and Services
  • Edge and Approach
  • PR & Comm
  • Contact

Don’t rely on hosting providers’ backups

andymilk | December 1, 2008

Most hosting providers backup their servers on a daily basis with an off-site backup once a week.  If something catastrophic happens to your server, code, or data, you can rewind to the time of the backup.  The problem is that the process for getting the disc or database image back up and running can sometimes take hours or even days.

I learned recently on a project that you should always add your own programmatic way of backing up and restoring a database.

On one specific Rails project, it was as easy as writing an 11 line rake task that performed a quick backup of the mySQL database.  A cron job runs this task once a day.  If you have enough disk space, feel free to run the backup more often.  Twice a day, every hour, etc.  You could also write another periodic task that clears out old versions of the backups, in case disk space is at a premium.

Restoring the database is as easy as running one command.   I use GZip to extract the data straight into mySQL.

Often times in the rush to finish a project, only the essential functionality and user testing is attended to.  Don’t forget about your data loss and recovery plan.  Take a few extra hours to build one.

Categories
Techniques
Comments rss
Comments rss
Trackback
Trackback

« The switch to Mac Use site uptime monitoring »

Leave a Reply

Click here to cancel reply.

About this Site

Andy Milk is a web software designer, developer, and consultant located in the Boston, MA area. This site showcases his portfolio and approach to design and development.

Phone: 617-290-8559
Email: andymilk@gmail.com

Other sites:
LinkedIn
Twitter
WorkingWithRails.com
Rock and Run

Hosting

- Blue Box Group
- MediaTemple

Post Topics

  • Good stuff
  • Partners
  • Projects
  • Techniques
  • Tools
  • Uncategorized

Partners

Elastic Communications
Anthony Caffiero
Ruth Lague
Ridge Marketing
Christopher Fannon Multimedia Design
Caroset Media
DesignSite
PixelSlam
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox

© 2009 Andy Milk Interactive, LLC