Volumes
A volume gives a workload storage that survives container restarts. Brig has
two classes, declared per workload in the [[volume]] block.
Local volumes
Section titled “Local volumes”[[volume]]mount = "/var/lib/data"A local volume (the default class) is a node-pinned Docker named volume. It
persists across restarts of the container on the same node, but it does not
move with the workload — if a replica is rescheduled to another node, it gets a
fresh empty volume there. Each replica has its own. Good for caches, scratch
space, and single-node stateful workloads pinned with
placement.
A compact form is also accepted for local volumes only:
volumes = ["/var/lib/data", "/tmp/cache"]Cloud (EBS) volumes
Section titled “Cloud (EBS) volumes”[[volume]]mount = "/var/lib/db"class = "ebs"size_gib = 100 # required for ebs; 1..16384An ebs volume is a cloud block device. It can detach from a failed node and
re-attach where the replica lands, so the data follows the workload. Because a
block device mounts to one node at a time, treat ebs volumes as single-writer
— pair them with instances = 1 or placement.together/same_node_only for
databases.
| Field | Local | EBS |
|---|---|---|
mount | required, absolute path | required, absolute path |
class | "local" (default) | "ebs" |
size_gib | not allowed | required, 1–16384 |
| survives node loss | no | yes |
| per-replica | yes | one device, single-writer |
Managing cloud volumes
Section titled “Managing cloud volumes”Local volumes live and die with their node and aren’t tracked individually. Cloud volumes are first-class resources you can list, inspect, and delete:
brig volume list # id, workload, volume, class, size, AZ, state, nodebrig volume inspect <volume-id> # full JSON detailbrig volume delete <volume-id> # only when unbound or in errorA cloud volume moves through these states:
| State | Meaning |
|---|---|
unbound | Provisioned but not attached. Safe to delete. |
provisioning | Being created at the cloud provider. |
attaching / preparing | Attaching to a node and setting up the block device. |
attached | Mounted and in use. |
detaching | Being removed from a node. |
error | Failed. Inspect for the reason; safe to delete. |
brig volume delete refuses unless the volume is unbound or error — you
can’t pull a disk out from under a running replica. Scale the workload to zero
or remove the volume from its spec first.
Backups
Section titled “Backups”Volumes are backed up with snapshots — point-in-time, encrypted tarballs streamed to your own S3 bucket. Add a policy inline:
[[volume]]mount = "/var/lib/db"class = "ebs"size_gib = 100snapshot_every = "24h" # minimum 1hsnapshot_keep = 7 # 1..365 retainedsnapshot_destination = "prod" # a workspace destination; omit = defaultSee Snapshots for on-demand backups, schedules, and restore, and Snapshot destinations for configuring the bucket.