S3 replication
Use two S3 providers at once. The contents of your primary bucket are copied regularly to a bucket at another provider, so your data survives one provider having a bad day. Copying runs from your own server and does not pass through Saka.
When this helps
Your app keeps files in S3 (photos, uploads, backups) and the provider goes down often. With replication there is an identical copy at a second provider, for example primary at IDCloudHost and backup at DigitalOcean Spaces. When the primary is down, you point the app at the copy.
How it works
- One direction: primary (source) to backup (copy). The source is never modified.
- Scheduled, not instant. The default interval is 60 minutes (5 minutes to 1 day). An object written just before the primary dies may not have been copied yet.
- Only missing or changed objects are copied, so it is safe to repeat and resumes by itself after an interruption. The first copy takes longest.
- It never deletes. Objects you delete in the primary bucket stay in the backup. That is deliberate, so the backup is a safety net, including against accidental deletes.
- It runs on the Saka server you choose. Data flows from one provider to the other through that server. The keys for both buckets are passed only to that server and are not recorded in the task history.
What you need
- Two buckets at two different providers. Create the backup bucket first at its provider.
- One access key per bucket. The primary key only needs read and list. The backup key needs write.
- One server already connected to Saka that can reach both endpoints. A small server is enough, but its bandwidth is used for copying.
Steps
- Open Settings, S3 destinations, and add two destinations: the primary bucket and the backup bucket. Each is tested before it is saved.
- Open the server detail page of the server that will copy, find the S3 replication card and press Set up replication.
- Choose the primary destination, the backup destination and the copy interval. Saka checks that the primary can be read and the backup can be written, then starts copying in the background.
- Watch the same card: object count in the primary, how many are not copied yet, when it was last in sync, and how many failed.
Buttons on the card: Copy now (skip the schedule), Compare (count the difference without copying), Reverse direction, Change and Turn off.
Reading the status
- Not yet copied: primary objects that are missing or different in the backup. Zero means in sync.
- Only in backup: objects no longer in the primary. They are not deleted.
- Last run: how many objects and bytes were copied, and how long it took.
- If copying keeps failing for more than 3 hours you get a Telegram message (at most once a day), and another when it recovers.
When the primary provider is down
Replication does not move your application automatically. The manual steps:
- Check the copy is recent enough: see Last in sync on the card.
- In your app, switch the S3 endpoint, bucket name and keys to the backup bucket and restart the app.
- After the primary recovers, press Reverse direction so what was written to the backup in the meantime is copied back to the primary.
- When they match, point the app back at the primary and press Reverse direction once more to restore the original direction.
If the same object changed on both sides, the source side of the direction currently running wins (when it is newer and the size or content differs). Avoid writing to both buckets at once.
Limits to know
- Interval based, not synchronous. For data you cannot lose even for a second, write to both buckets from your application.
- Deletes are not propagated, so the backup bucket can grow larger than the primary. Clean it yourself if needed.
- Copied: object contents, content type and custom metadata. Not copied: ACLs, versioning (latest version only), object tags and customer-key encryption (SSE-C).
- Cost: data leaving the primary provider may be charged as bandwidth. A big bucket means a big first copy. The backup provider also charges for storage.
- One server runs one bucket pair. For more pairs, use different servers.
- A bucket with millions of objects takes a long time just to list. Use a prefix (folder) in the S3 destination to limit the scope.
- The two destinations must not be the same or contain each other (for example the same bucket with a prefix inside it).
API and MCP
GET /api/v1/server/<id>/replika-s3
POST /api/v1/server/<id>/replika-s3
{"aksi":"atur","utama_id":"s3_...","cadangan_id":"s3_...","jadwal_menit":60}
{"aksi":"sekarang"} | {"aksi":"bandingkan"} | {"aksi":"balik"} | {"aksi":"hapus"}AI agents use the MCP tools replika_s3_status, replika_s3_nyalakan and replika_s3_sekarang. Reversing and turning off replication are deliberately panel-only.