Docs / S3 replication

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

What you need

  1. Two buckets at two different providers. Create the backup bucket first at its provider.
  2. One access key per bucket. The primary key only needs read and list. The backup key needs write.
  3. One server already connected to Saka that can reach both endpoints. A small server is enough, but its bandwidth is used for copying.

Steps

  1. Open Settings, S3 destinations, and add two destinations: the primary bucket and the backup bucket. Each is tested before it is saved.
  2. Open the server detail page of the server that will copy, find the S3 replication card and press Set up replication.
  3. 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.
  4. 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

When the primary provider is down

Replication does not move your application automatically. The manual steps:

  1. Check the copy is recent enough: see Last in sync on the card.
  2. In your app, switch the S3 endpoint, bucket name and keys to the backup bucket and restart the app.
  3. After the primary recovers, press Reverse direction so what was written to the backup in the meantime is copied back to the primary.
  4. 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

API and MCP

REST
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.