You're reading the docs for v1.0, an older version. Read the latest docs
s3mirror documentation · v1.0.4
No vendor lock-in.
Copy what changed.
s3mirror copies every bucket on one S3-compatible endpoint to another. It compares objects by key
and size, copies the ones that are new or a different size, and by default deletes what the source
no longer has. --no-delete keeps a run copy-only.
$ brew tap netspeedy/s3mirror && brew install s3mirror$ s3mirror --config config.yaml --no-delete # after the connection checks, one section per bucket: ====================================================================== [1/2]: app-data ====================================================================== Source: 4 objects Destination: 3 objects Actions: 3 to copy (100.8KB), 0 to delete ✓ Copied 3 objects in 0.0s (39.8MB/s) ✓ Bucket completed in 0.0s # and the summary ends with ✓ Status: COMPLETED SUCCESSFULLY
# config.yaml source: endpoint_url: "https://s3.source.example.com" aws_access_key_id: "SOURCE_ACCESS_KEY" aws_secret_access_key: "SOURCE_SECRET_KEY" verify_ssl: true destination: endpoint_url: "https://s3.destination.example.com" aws_access_key_id: "DEST_ACCESS_KEY" aws_secret_access_key: "DEST_SECRET_KEY" verify_ssl: true
# from cron or a systemd timer: the full log goes to the file, # and only errors reach the console $ s3mirror --config /etc/s3mirror.yaml \ --log-file /var/log/s3mirror.log # the same run from the container image $ docker run --rm \ -v /etc/s3mirror.yaml:/config/config.yaml:ro \ -v /var/log/s3mirror:/logs \ ghcr.io/netspeedy/s3mirror:v1.0.4 \ --config /config/config.yaml --log-file /logs/s3mirror.log # exit code 0 means no errors were counted; alert on anything else
Browse the docs
From a first copy-only run to every config key.
Getting started
Install it and run a first, copy-only mirror.
How mirroring works
What gets copied, what gets deleted, and why.
Guides
Configure it, schedule it, run it in a container.
Reference
Look something up.