Pramod Gouda Pramod Gouda - 1 year ago 94
Linux Question

Bidirectional synchronisation between Amazon s3 bucket and physical server

We have a folder in physical server and need to synchronise with one of our Aws s3 bucket. But here the requirement is , we have to synchronise the contents in both the ways (Changes done in the physical server should reflect in Aws S3 bucket and vice versa).Is it possible?

Answer Source

Yes this can be done. you can achieve this sync with combination of was s3 sync command and cron job. Make sure you have AWS CLI installed on you local server and your user has full access to S3 bucket.

Start a cron job at your local server with reference to below sample command.

aws s3 sync /<local-directory> s3://mybucket