Skip to main content

S3, B2, and R2 Remotes

S3-compatible backends are common for production backups, but each provider has endpoint and auth differences.

Learning Focus

Configure object storage once, then validate read/write access with a repeatable smoke test before you point jobs at real backup prefixes.

Provider Snapshot

ProviderBackend typeEndpoint requirementCommon auth
AWS S3s3Region-basedAccess key + secret
Backblaze B2b2 or s3B2 endpointKey ID + app key
Cloudflare R2s3Custom account endpointAccess key + secret
DefaultWhy it helps
Separate buckets/prefixes per environmentPrevents staging/prod mixups
Dedicated backup credentialsReduces blast radius
Versioning (when available)Makes deletes less catastrophic
Lifecycle policiesControls costs automatically
rclone config

Choose new remote, then set backend type and credentials exactly as provider docs specify.

note

For R2 (S3-compatible), you typically need a provider-specific endpoint. For AWS S3, the region is critical.

Endpoint Validation

remote-healthcheck.sh
rclone listremotes
rclone lsd s3-prod:
rclone mkdir s3-prod:healthcheck
rclone rmdir s3-prod:healthcheck

Permission Model (What You Actually Need)

Design permissions based on your operation:

OperationTypical needs
copy to archivelist + write
sync mirrorlist + read + write + delete
verification-onlylist + read
warning

If your job uses sync, your credential likely needs delete rights. Treat that as a high-risk permission.

Example Remote Usage

rclone sync /backup/current s3-prod:infra/backups/current --progress
rclone sync /backup/current b2-prod:infra/backups/current --progress
rclone sync /backup/current r2-prod:infra/backups/current --progress
warning

Do not reuse root-account cloud credentials in automation. Create dedicated backup credentials with scoped permissions.

Verification Checklist

CheckCommand
List rootrclone lsd s3-prod:
Create prefixrclone mkdir s3-prod:labs/rclone
Write objectrclone copy /tmp/test.txt s3-prod:labs/rclone/
Delete objectrclone delete s3-prod:labs/rclone/test.txt
Remove empty dirrclone rmdir s3-prod:labs/rclone

Common Pitfalls

PitfallSymptomResolution
Wrong region/endpointSignature mismatch, 403Reconfigure endpoint and region
Missing bucket permissionList works, write failsAdd object write/list/delete rights
Copying test config to prod blindlyMisrouted backupsValidate each remote with smoke tests

What's Next