2015/10/15

s3cmd configuration

Visit http://tecadmin.net/install-s3cmd-manage-amazon-s3-buckets/

Install on Debian

#apt-get install secmd

Configuration
#s3cmd --configure

List all buckets
#s3cmd ls

List bucket data
#s3cmd ls s3://bucketname


HOW TO SYNC
# s3cmd sync source s3://BUCKETNAME/DESTINATION/

# To sync (delete files not in source) + upload new/changed files to destination
# Dry run
s3cmd sync --dry-run --delete-removed /source-contents/ s3://s3tools-demo/some/path/
s3cmd sync --dry-run --delete-removed /source-folder s3://s3tools-demo/some/path/


# Database incremental backup - daily
s3cmd sync sourcefolder/ s3://bucketname/db/

# File incremental backup weekly
s3cmd sync /var/www s3://bucketname/files/

# File sync - monthly
s3cmd sync --delete-removed /var/www s3://bucketname/files/
s3cmd sync --delete-removed /home/backup/db/ s3://bucketname/db/

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete