0

One of the news sites I'm developing is heavily reliant on its image database, which has been migrated from the old site and is ~15-20gb at this point.

It's dawned on me that it would be really bad if there was some sort of server malfunction and all of the images in that directory were lost -- they're generally created on-the-fly by one person every week from much higher-resolution versions that have been pushed so far back into a totally-disorganized archive that it would take ages to resize and upload them all again (Which isn't even going into the awful process that would be re-adding them to the site's ~15,000 article nodes).

To this end, I'm looking for a way of backing up the uploaded images folder in sites/default/files. One thought I've had is to use Subversion's WebDAV Autoversioning capability, though I'm not overly sure how I'd get the Drupal 7 filefields to use this.

I could also just write a script to rsync files between two servers once a night -- the newspaper's office has a few servers for that sort of thing.

Any thoughts what a good backup solution would be for this particular situation?

Thanks!

3
  • On another note -- would somebody with higher rep than me create tag synonyms for "svn", "subversion", "git", etc. with "version-control"? Took me a solid few minutes to figure out I should use that tag for what I'm asking for, not super intuitive (Which might be why that tag only has ~30 odd uses). – aendrew Oct 26 '12 at 9:28
  • 2
    I don't think making git and svn (for example) tag synonyms of version-control is a great idea. Enough people still use both systems that there might be Drupal related VCS questions related to a specific system. – Chapabu Oct 26 '12 at 10:02
  • 1
    I've created a Drupal Answers Meta issue here if you want to chime in though :) – Chapabu Oct 26 '12 at 10:29
1

I have not been in the situation before, if I were in your shoes I would take a look at the CDN module.

In File Conveyor mode (ie, a push model), it will automagically copy files up to your CDN of choice. A side effect of this is the fact that the files will now live in two places. You can go with one of the commercial CDNs, or you can set up your own with another server.

1
  • Sounds close -- I'll take a look at that in a bit! – aendrew Oct 26 '12 at 19:23
0

I could also just write a script to rsync files between two servers once a night -- the newspaper's office has a few servers for that sort of thing.

I'd suggest this option, as it seems you have thousands image files, so any php/drupal solution will be slow and may affect your server's performance. Rsync is pretty fast after the initial copy, so you can just run it every 10 minutes. Also, you can should copy to more than one server - minimum two other backup servers.

1
  • 1
    There are packages like lsyncd and fileconveyor that automate the process, so you don't need to periodically run rsync. IIRC, lsyncd uses rsync for the file copy, and therefore is fast. – mpdonadio Oct 28 '12 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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