Commands / kosa8 snapshot push
kosa8 snapshot push
Upload a snapshot to remote storage (Cloudflare R2)
Usage
kosa8 push SNAPSHOT
Uploads a snapshot to R2. A labelled snapshot above the floor level goes only to a destination the org policy lists for its label (remote:HOST/BUCKET), and the daemon records the transfer; with no policy, only unlabelled and UNCLASSIFIED snapshots are pushed.
A snapshot encrypted at rest is always sent encrypted;
--encrypt encrypts one that is not on the way out, leaving the local copy as it
is. An encrypted push carries its data key wrapped under this machine's KEK, so
only a machine holding the same KEK (kosa8 key import) can pull it.
--incremental pushes the snapshot as content-defined chunks (kosa8-chunked/1) and sends only the chunks this machine has no record of the bucket holding, so a later snapshot of the same sandbox costs what changed. It retries with backoff through a dropping link, and an interrupted push, run again, carries on from the chunks that landed. The snapshot appears in the bucket only when it is complete. Encrypted chunks are keyed per sandbox (--key-scope lineage), which is what lets snapshots of one sandbox share them; --key-scope snapshot shares nothing. Pulling one needs a kosa8 with chunked transfers. See docs/design/edge-sync.md.
Under an org policy with require_snapshot_encryption every push is encrypted, asked or not, and --key-scope none is refused; the policy's snapshot_key_scope (per snapshot unless it says lineage) is the default scope.
Options
| Flag | Type | What it does | Default |
|---|---|---|---|
--encrypt | bool | encrypt the snapshot for transit (AES-256-GCM) even though it is not encrypted at rest | — |
--incremental | bool | push as content-defined chunks, sending only what the bucket lacks; resumable | — |
--key-scope | string | with --incremental: lineage (share chunks within the sandbox), snapshot (share none), or none (plaintext) | — |
--parallel | int | requests in flight at once; on a high-latency link more hide the round trip | 4 |
--rescan | bool | with --incremental: list the bucket rather than trust this machine's record of what it holds | — |
--retries | int | attempts per request before giving up (with backoff); a failed transfer resumes when run again | 10 |