no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


s3cmd [2015/06/01 21:29] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== s3cmd ======
  
 +  * [[Amazon S3]]
 +
 +==== Amazon S3 Sync ====
 +
 +A simple way to keep local archives and an Amazon bucket up to date is to sync the two locations.
 +
 +Here's a command that would take all the MySQL archives in ''/var/archives/mysql'' and sync them with the Amazon bucket, deleting any remote files that are no longer on the filesystem:
 +
 +<code>
 +s3cmd --delete-removed sync /var/archives/mysql/ s3://steve-backups/mysql/
 +</code>
 +
 +==== Examples ====
 +
 +== List all the files on a bucket ==
 +
 +<code>
 +s3cmd ls s3://steve-bucket/ | sed 's/.* //g'
 +</code>
 +
 +== Find archives that are 2 months old ==
 +
 +<code>
 +s3cmd ls s3://steve-bucket/ | sed 's/.* //g' | egrep "`date --date "-2 months" +%Y%m`[0-9]{2}"
 +</code>

Navigation
QR Code
QR Code s3cmd (generated for current page)