Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to mirror my Amazon S3 buckets. I want to do this because 1) I don't want all my data only existing with one provider; and 2) in case of software error or security breach I want to have the data backed up.

I can mirror to a local disk with the s3cmd sync function, but that does not scale for very large buckets and is not useful for quick backup restores. I'd rather have my data mirrored to a competitor like Rackspace Cloud Files.

Anyone have some suggestions on a simple and robust way to facilitate this kind of mirroring in an automated way on a Linux box?

share|improve this question
add comment

4 Answers

You can use the "s3cmd" utility with the "sync" option, although I stumbled on your question because I'm trying to figure out if this syncing mechanism is screwing up my duplicity backups.

share|improve this answer
    
this is indeed the best solution i've found s3tools.org/s3cmd-sync –  John Bachir Sep 13 '12 at 16:01
add comment

I was having the same problem so I whipped up a little program specifically designed to mirror one S3 bucket to another; I call it s3s3mirror.

I did try the "s3cmd sync" approach first, but I had a bucket with hundreds of thousands of objects in it, and "s3cmd sync" just sat there, not doing anything but consuming more and more memory until my system died. I designed s3s3mirror to get going immediately, to use 100 concurrent threads (configurable), and to make modest use of CPU and memory. If I do say so myself, it's pretty freakin' fast.

I've made this available on github under an Apache License. If you decide to give it a whirl please let me know what you think and if there's anything that can be improved.

Here's the link: https://github.com/cobbzilla/s3s3mirror

thanks!

  • jonathan.
share|improve this answer
add comment

Check out Jungle Disk Server. It works with both Amazon S3 and Rackspace Cloud Files. You could mount S3 and CF in different locations on your filesystem and then use rsync between the two.

share|improve this answer
    
Thanks, but I should have mentioned that I'm looking for a solution I can run as a cron job on a Linux box. I've updated the question. –  Ben Sep 29 '10 at 12:16
add comment

You could try mounting the buckets with fuse using s3fs. Once that's done, you can then rsync from the mount point to your local disk.

share|improve this answer
1  
+1 for s3fs, I just committed a patch to support files up to 5TB in size. –  ben lemasurier Aug 30 '11 at 17:58
add comment

protected by Chris S May 21 '13 at 15:50

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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