Backups with rclone
rclone is the swiss-army knife for object storage and speaks any S3-compatible API, including chili. If you already use rclone for AWS S3, you only change the endpoint and keys.
Prerequisites
- rclone 1.60 or newer (
rclone version) - chili access keys (access key and secret) from the portal
- a bucket, or permission to create one
1. Configure the remote
In ~/.config/rclone/rclone.conf:
[chili]
type = s3
provider = Other
access_key_id = AKIA...
secret_access_key = ...
endpoint = https://<ENDPOINT>Test the connection:
rclone lsd chili:2. Back up data
rclone mkdir chili:my-backup
# copy: transfers only new and changed files, never deletes at the target
rclone copy /data chili:my-backup --transfers 8 --checksum --progresssync mirrors the target exactly to the source and deletes what is missing there, so always check with --dry-run first:
rclone sync /data chili:my-backup --transfers 8 --checksum --dry-run--checksum compares by checksum rather than timestamp and size, which is the more reliable choice for backups.
3. Immutable backups
Object Lock (WORM) is set server-side on the bucket, not by rclone. Create the bucket with Object Lock enabled and a default retention, and every uploaded object inherits the lock automatically. That keeps a backup immutable even if the machine that wrote it is compromised.
4. Automate
# /etc/cron.d/chili-backup (daily at 02:30)
30 2 * * * backupuser rclone copy /data chili:my-backup \
--transfers 8 --checksum --log-file /var/log/chili-backup.logThe result: an S3-compatible backup target in Switzerland, in Zurich or Geneva and geo-redundant on request, with no egress fees. The restore costs nothing extra.