====== s3cmd ====== * [[Amazon S3]] * [[https://s3tools.org/s3cmd|Homepage]] ==== 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>
Trace:
Article
Show pagesource
Old revisions
Log In
Navigation
[
Please fill or disable this placeholder (:wiki:navigation)
]
Search
Toolbox
What links here
Recent Changes
Site index
Printable version
QR Code