Migrate from AWS S3 to chili
This guide shows how to move a bucket from AWS S3 (or any other S3-compatible source) to chili with rclone. You configure a source and a target remote, copy the objects with checksum comparison, verify the result and optionally lock the target bucket with Object Lock. The closing read test costs nothing, because chili charges no egress fees.
Prerequisites
- rclone 1.60 or newer (
rclone version) - access to the source: for AWS S3, an access key and secret key with read permission on the source bucket and its objects
- chili access keys (access key and secret key) with write permission on the target bucket, created in the chili Console
- enough bandwidth: the migration is a client-side transfer (see step 3)
1. Configure the source remote (AWS S3)
Add the source remote with rclone config or enter it directly in ~/.config/rclone/rclone.conf. For Amazon S3, rclone sets the provider explicitly to AWS (rclone S3 documentation):
[aws-s3]
type = s3
provider = AWS
access_key_id = AKIA...
secret_access_key = ...
region = eu-central-1Set region to the region of the source bucket.
2. Configure the target remote (chili)
chili is a generic S3 provider. Add a separate remote with the chili endpoint:
[chili]
type = s3
provider = Other
access_key_id = AKIA...
secret_access_key = ...
endpoint = https://s3-ch-east.chilistorage.comIf your rclone setup asks for a region, use ch-east.
Test both connections:
rclone lsd aws-s3:
rclone lsd chili:3. Dry run
AWS S3 and chili are different providers behind different endpoints, so they are different rclone remotes. That makes this migration a client-side transfer: rclone downloads from AWS and uploads to chili. Server-side copy is not possible here, because according to the rclone S3 documentation it requires the same remote for source and target and the same region.
First check with --dry-run what would be transferred, without moving any data:
rclone copy aws-s3:SOURCE-BUCKET chili:TARGET-BUCKET --dry-run --fast-list4. Run the migration copy
rclone copy transfers only new and changed files and never deletes at the target (rclone copy documentation). You can therefore safely repeat the command, for example after an interruption:
rclone copy aws-s3:SOURCE-BUCKET chili:TARGET-BUCKET \
--checksum --transfers 8 --fast-list --progress --s3-no-check-bucketThe flags in detail:
--checksumcompares files by hash and size instead of modification time and size. When both ends are S3, the rclone S3 documentation recommends this flag for maximum efficiency.--transfers 8increases parallelism (the default is 4, see rclone flags). The value 8 is only an example; tune it to your bandwidth and quotas.--fast-listuses recursive listings, which reduces the number of S3 transactions on large buckets but needs more memory (rclone flags).--progress(-P) shows progress during the transfer (rclone flags).--s3-no-check-bucketskips checking whether the bucket exists and creating it. Use it when the target bucket already exists or the credentials cannot create buckets (rclone S3 documentation).
If the target should mirror the source exactly and delete objects that no longer exist at the source, use rclone sync instead of copy (rclone copy documentation). Only do this when deleting at the target is intended, and always run it with --dry-run first.
5. Verify integrity
rclone check compares both sides by size and hash (MD5 or SHA1) and reports any differences (rclone check documentation):
rclone check aws-s3:SOURCE-BUCKET chili:TARGET-BUCKET --checksumIf no common hash is available, or you want to verify the full content, --download downloads both sides and compares them on the fly (rclone check documentation):
rclone check aws-s3:SOURCE-BUCKET chili:TARGET-BUCKET --downloadrclone cryptcheck is only needed if the target is an encrypted crypt remote (rclone cryptcheck documentation). For a plain S3-to-S3 migration without a crypt layer, stay with rclone check.
6. Object Lock on the target bucket (optional)
Object Lock (WORM) is set server-side on the bucket, not by the client. Create the target bucket in the chili Console with Object Lock enabled and the retention period Fixed period before the migration, and every uploaded object inherits the lock automatically. That keeps the copy immutable even if the machine that wrote it is compromised later. Setup details are on the Object Lock page.
Verify
Finish with a read test against chili. Because chili charges no egress fees, this test costs nothing. Download a migrated object and compare it with the original:
rclone copyto chili:TARGET-BUCKET/path/to/object.dat ./restore-test.dat
rclone check aws-s3:SOURCE-BUCKET chili:TARGET-BUCKET --checksum --one-wayExpected output of rclone check after a complete migration:
NOTICE: S3 bucket TARGET-BUCKET: 0 differences found
NOTICE: S3 bucket TARGET-BUCKET: <N> matching filesIf 0 differences are reported, all source objects are in chili.
Common pitfalls
- Endpoint format: enter the chili endpoint as a full URL including
https://:https://s3-ch-east.chilistorage.com. Without the scheme or with a typo, the connection fails. - Region on the chili remote: the chili region is
ch-east. Do not enter an AWS region for the chili remote. - Region on the source remote: if the
regionof the AWS remote does not match the source bucket, listing can fail. - Expecting server-side copy: this migration runs client-side. Plan the transfer time based on your bandwidth and run rclone as close as possible to one of the two sides.
- Wrong command for verification: use
cryptcheckonly for crypt remotes, otherwisecheck. - Chunk and cutoff sizes: if you want to adjust
--s3-upload-cutoffor--s3-chunk-size, check the current defaults under Advanced options in the rclone S3 documentation.