How do I automatically backup a website (files and database) to a Mac?
March 11, 2009 10:31 AM   RSS feed for this thread Subscribe

What is the best way to automatically backup a website (files and database) to a Mac? Suggestions for Windows?

I build websites, and I have a client who pretty much only has Macs. They want a solution where they can automatically backup an entire website (files and database) to their machines. I have access to the admin area of the hosting account. If I'm unable to find an easy to install/use solution for the Mac, a Windows solution would also work.
posted by HC Foo to computers & internet (4 comments total) 3 users marked this as a favorite
My usual mac solution to this issue:

1. mysqldump
2. tar
3. ftp
4. cron

There may be something out there that wraps this all under a pretty GUI, but I'd expect not since a general-purpose solution to this could so easily get tripped up by sites which may store important files in non-obvious locations, different database schemes, etc.
posted by ook at 10:43 AM on March 11


It's pretty simple if you have SSH and/or crontab access to your webhost. Simply write a shell script that runs mysqldump (or the database dumping utility of the database of your choice), then creates a gzipped tarball of your web area and your database dump (I use `date +%Y%m%d` to name my tarballs after the day on which they were created).

If you use cron then you can have this task run every night. OS X boxes also have cron; you can set your client's boxes up to automatically download the website backup daily using cron as well.
posted by mebibyte at 10:50 AM on March 11


Super Flexible File Synchroniser is a bit of cross-platform software we use for syncing two Windows servers over the internet, and would be well suited for this application. You give it a local path on the left, a SSH or FTP server on the right, then tell it what you want to suck down, how often and when you want it to happen, and various other bits.

My personal solution would be the cron jobs mentioned above, but SFFS is a nice GUI way of doing it for relatively little cost.

A trial is available from the website.
posted by sektah at 11:45 AM on March 11


I have my Mac and websites set up to do what you're trying to do.

By using cron jobs, I automatically make a backup of my entire domain - and I - make a separate backup of my mysql*. I create these backups in the root of my user (one level before my domain, so I don't add the tar backup file to the next night's backup of my domain and double the size of the download)

Next, I created a favorite in my FTP program (I use Transmit, and I love it!) for the backup (it just seemed easier this way)

Then, I use Apple's Automator to create a workflow that opens the favorite in Transmit and downloads the file. NOTE! Since I kept the file name generic, this overwrites the previously downloaded version of my site. That way, I always have the most recent backup.

Finally, I created alarms in iCal to launch the saved Automator apps (the files that launch the downloads). Since I have multiple sites, I have multiple downloads.

Sooooooo... it works like this:

I leave my Mac on 24/7. At 3am (when, dammit, I should be in bed), an iCal alarm goes off that launches the app that launches Transmit, and the download begins. By the time I wake up in the morning, it's done.

For me, the best part of this solution is iCal. I schedule downloads of my domain backups based on activity of the site. I back up my blog twice a week, my photography site twice a month, my work portfolio once a month, etc.

Is it a pain in the butt to set up? You Betcha! (insert a Sarah Palin wink here) ...but once it's set up, it's done. Set it and forget it. The only thing you need to remember is to leave your Mac on.

*For my blog, I donload the entire domain once a week and the mysql twice a week. It's grown quite large over the years...
posted by 2oh1 at 2:43 PM on March 11


« Older LA Camping --- We're going to ...   |   Why does eating yogurt (partic... Newer »

You are not logged in, either login or create an account to post comments