Hello I am looking for a script to sync my /backup/ folder to Amazon S3. Thank you
write one yourself Use s3cmd GitHub - s3tools/s3cmd: Official s3cmd repo -- Command line tool for managing Amazon S3 and CloudFront services or aws cli native client as basis What Is the AWS Command Line Interface? - AWS Command Line Interface
Here is what I wrote: Code: #!/bin/bash DESDIR=/home/nginx/domains/mydomain.com/backup/ S3DIR="s3://mylocation/mysite/" # RSYNC to AWS S3 s3cmd sync --skip-existing $DESDIR $S3DIR Not sure if it's right, but it's been working for over a year. I have a 10 day retention policy setup on the S3 folder itself.
Nice if you use s3cmd sync be sure to read and understand Amazon S3 Tools: S3 Sync - How To Sync Files to Amazon S3 fully
Also, be mindful of the costs involved with syncing whole directories with S3, the costs can soon mount up, as they bill for each request type.