Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Synchronizing S3 Folders/Buckets [closed]

Tags:

amazon-s3

I have an S3 Bucket that holds static content for all my clients in production. I also have a staging environment which I use for testing before I deploy to production. I also want the staging environment to point to S3 to test uploads and other functions. Problem is, I don't want the staging server to reference the same production s3 bucket/folder, because there is a risk of overriding production files.

My solution is to use a different folder within the same bucket, or create a different bucket all together that I can refresh periodically with the contents of the production bucket. Is there a way to easily sync two folders or buckets on Amazon S3?

Any other suggestions for managing this type of scenario would also be greatly appreciated.

like image 269
Zakir Hemraj Avatar asked Nov 24 '09 22:11

Zakir Hemraj


3 Answers

s3cmd is a nice CLI utility you can use in a cronjob. It even as a sync feature similar to *nix rsync.

like image 104
Jay Sidri Avatar answered Oct 21 '22 10:10

Jay Sidri


There's also DragonDisk - like cloudberry explorer and other amazon s3 clients - except it's free and multi-platform (QT).

It does sync jobs, both local<->s3 and s3<->s3. It also has a command line interface which can do syncing: http://www.dragondisk.com/faq.html

like image 21
Duncan Lock Avatar answered Oct 21 '22 08:10

Duncan Lock


Here's an example on S3CMD for your reference https://www.admon.org/system-tuning/sync-two-amazon-s3-buckets/

like image 29
admon_org Avatar answered Oct 21 '22 10:10

admon_org