Skip to content

Snapshot destinations

A snapshot destination is one S3-compatible bucket your workspace can target. You configure it once in Settings → Snapshot storage (or via brig snapshot destination add); workloads then reference it by name in TOML.

  • You own the storage. Brig never holds tenant data outside of metadata.
  • You pay your S3 provider directly. No markup, no surprise egress bills on Brig’s invoice.
  • You choose the region. EU residency? Use a Frankfurt bucket. Cheap egress? Use Cloudflare R2.

Any provider that speaks the S3 API + SigV4. We test:

  • AWS S3 — leave the endpoint blank.
  • Cloudflare R2https://<account>.r2.cloudflarestorage.com.
  • MinIOhttps://minio.example.com (or http://minio:9000 for the local dev walkthrough below).
  • Backblaze B2https://s3.us-west-002.backblazeb2.com.
  • Scaleway, DigitalOcean Spaces, Wasabi, Tigris — same shape.

If a provider supports SigV4 and either path-style or virtual-hosted addressing, it’ll work. Brig auto-flips to path-style for any non *.amazonaws.com host, which covers every non-AWS provider in practice.

Terminal window
export AWS_SECRET_ACCESS_KEY=<secret>
brig snapshot destination add prod \
--endpoint https://s3.us-west-002.backblazeb2.com \
--region us-west-002 \
--bucket brig-snapshots-prod \
--access-key-id <key> \
--secret-access-key-from-env AWS_SECRET_ACCESS_KEY \
--default

Then probe it (writes, reads, and deletes a small object):

Terminal window
brig snapshot destination test prod

Settings → Snapshot storage → Add destination. Same fields, same result. Secret access keys are sealed under your tenant DEK on save and never displayed again, even to you.

One destination per workspace can be marked default. Workloads that don’t name a destination in their TOML use it. Switch defaults at any time via brig snapshot destination set-default <name>.

For local dev or self-hosted backup testing, run MinIO in Docker:

Terminal window
docker run -d --name minio \
-p 9000:9000 -p 9001:9001 \
-e MINIO_ROOT_USER=brigtest \
-e MINIO_ROOT_PASSWORD=brigtest-secret \
minio/minio server /data --console-address ":9001"
# create the bucket
mc alias set local http://localhost:9000 brigtest brigtest-secret
mc mb local/brig-snapshots
# register with Brig
brig snapshot destination add local-minio \
--endpoint http://localhost:9000 \
--region us-east-1 \
--bucket brig-snapshots \
--access-key-id brigtest \
--secret-access-key-from-env MINIO_ROOT_PASSWORD \
--default

(MINIO_ROOT_PASSWORD is already brigtest-secret in the shell that started the container above — reuse it rather than retyping the secret on argv.)

Re-run the add command with the same name and new credentials. The row is updated atomically; the next snapshot fire picks up the new secret without re-creating the schedule.

Terminal window
brig snapshot destination remove prod

Existing snapshot rows keep their bucket reference. If you later want to restore one, re-add credentials for the original bucket under any name — Brig resolves by endpoint+region+bucket, not by destination name.