15

I was just wondering how the community backs up their websites?

I take a nightly dump the database and shift it across onto another server which then gets backed up onto removable media. It is fairly automated and seems to work but I would be interested to hear what others have to say.

1

7 Answers 7

3

The site code is in Subversion, which is in turn backed up nightly. Any development of the code is done on dedicated dev servers. Production is only updated once the new version has been tested.

The content in relational databases is backed up nightly.

Some of our sites have a huge volume of static content (images, pdfs etc.) and those are stored on RAID5 SANs, mirrored to an offsite facility and have tape backups just in case.

We do not backup log files as we do not rely on them much.

1
  • I would also suggest a VCS like Suberversion, Bazaar, Mercurial, Git, etc.
    – fwaechter
    Aug 12, 2010 at 22:53
2

Nightly DB Dump to file

Nightly DB permissions dump to file (Maatkit)

Use Tarsnap for offsite backup of DB dumps plus everything in /var/www/

1

One option that I've used on a couple of sites is to use SyncBack, JungleDisk, and an Amazon S3 account. (I would post links to these products and services, but SE prohibits us new users from posting more than 1 link. Boo.)

For those not familiar with these tools, SyncBack is an awesome and very feature-rich program for syncing files between different folders. JungleDisk let's you create a virtual drive that, behind the scenes, reads and writes data to Amazon S3's storage service, which is a cloud-based storage solution that's pretty affordable (presuming you're not pushing up gigabytes of data into the cloud every day).

We have SyncBack run on a schedule, like once a night or once a week, and it copies the new/changed files from the local hard drive to the JungleDisk virtual drive, and removes any deleted files from the virtual drive.

What do we store in the cloud? Well, we have SQL Server do a nightly backup and have it configured to keep those backups for two weeks. These backups are pushed up to the cloud every night. We also push up our source code repositories every night. A complete backup is done of static files, assets, utilities, and other such files on a weekly basis.

What's nice about this approach is that all the files are in the cloud, meaning we can access them from anywhere. No need to RDP into the dedicated server if you've got JungleDisk on your desktop - you can see the files in the cloud as if they were on a drive on your local computer. Another benefit is cost. For one of my clients the web hosting company that hosts the site will sell an offsite storage backup service to its dedicated server clients, but the costs was several hundred dollars per month. This approach had some up front costs - the SyncBack and JungleDisk licenses - as well as storage and bandwidth costs from Amazon S3, but, if I recall correctly, these costs were less than what one month of the hosting company's backup plan would have cost. And this way we don't have to take the hosting company's word that our site is getting backed up - we can see our files in the cloud at any time from anywhere in the world.

(I was introduced to this approach by my colleague Michael Campbell.)

1

In addition to Subversion, nightly MySQL dumps, and a redundant (mirrored) server image, we're spoiled by having a host (AISO.NET) who also does hourly snapshots as part of all their hosting packages. Not only do I get to feel good about hosting with a company that's never used any grid-based power (they power the entire facility with on-site solar and wind), but I also get piece of mind that comes with reliable, easy to recover snapshots AND a virtualized solution that reboots literally in the blink of an eye if it's ever necessary.

The snapshot has saved my bacon more than once....and it's a heck of a lot quicker than going through the motions of untar, rebuild, and pray that comes along with other backups.

0

Why do you keep the master copy of the code on the webserver? I don't keep any code or programs on the webserver which I can't replace instantly.

I back up the log files and user inputs using purpose-written scripts.

1
  • Sorry, the master code is kept in Git on other servers, the code on the server would be replaced instantly if required.
    – Toby
    Aug 12, 2010 at 14:06
0

I have my code elsewhere but that won't take care of backing up blog posts on the live website. I have a shared hostgator reseller account and there really isn't any built in automated way to back up. I just found siteautobackup.com because it says it can back up everything from the WHN level but the product doesn't seem to be working yet.

2
  • Can you not even get in via SSH and do a mysqldump?
    – Toby
    Aug 12, 2010 at 14:57
  • No - HostGator disallows SSH access, however, it's fairly trivial to set up a cron job with a recursive wget call over FTP (if you don't mind exposing your login details).
    – danlefree
    Aug 12, 2010 at 16:26
0

we run a multisite wordpress system. our strategy is to backup databases every 12 hours to a remote space, wp-content every day, public_html every week (or when we make major modifications in system's core like upgrading wordpress core), and a monthly backup of the whole home directory. this is working well with our system

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.