Skip to main content

Data & backups

A copy of a customer's data is the most consequential thing the platform holds, so three questions are answered explicitly rather than by default: whose decision it is, what a copy contains, and how one is put back.

Whose decision it is​

Copies are taken only for a tenant that has agreed to them. A tenant's data copied to a destination the tenant does not control is a second place that data sits, kept for a retention count the tenant did not choose — so the schedule copies a tenant once that tenant has said to, and not before.

Every tenant starts with no decision recorded, which reads as off. A deployment whose tenants have never been asked takes no copies at all, and each pass reports how many tenants that is rather than leaving them out of its arithmetic. That number is the one to look at after a first deployment: it is the expected state, not a fault.

Three answers, and the third needs a second:

DecisionThe scheduleWhat is already held
oncopies it on every passkept, pruned to the retention count
pausedtakes nothing newkept, untouched
offtakes nothing newthe same request says keep or delete

There is no default for that last one, because one reading of withdrawing destroys a customer's only copies and the other keeps data they asked to stop adding to. paused and off differ in what may be kept, not in what is taken: a closure may keep a final copy of a paused tenant, and is refused for one that withdrew.

Who can decide, and where​

  • The tenant, at PUT /tenants/{slug}/backups/consent, authorized by its own OIDC client. This is what your application calls — see packaging.
  • The buyer, at the point of sale: the pricing page carries backup_copies=on|off into checkout and it is recorded against the tenant as the tenant is created, and only then, so a redelivered payment callback cannot undo a decision the tenant has made since.
  • A platform admin, for a decision a customer gave by email, in a contract or through support. That surface requires a reason saying where it was given, because a consent record that cannot say where it came from answers nothing later.

The record carries who decided and when, so it is answerable afterwards rather than only now.

What follows from the decision​

  • A withdrawal refuses a closure that keeps a final copy, naming delete as the disposition that decision leaves.
  • A move copies whatever the decision says, because carrying the data is how a move happens, and deletes the copy it made afterwards unless copies are on.
  • The condition about a tenant holding no copy is raised only for a tenant whose copies are on. For the others, holding none is what they asked for — and a condition nothing can clear is one people learn to ignore.
  • A reused name does not inherit an agreement: the decision is forgotten with the closure, so the pass cannot copy a new customer's data on a previous customer's agreement.

What a copy contains​

Your product declares every place it keeps data, as a named backup and a restore of the same name. The platform runs your commands; it knows nothing about your schema.

A tenant's copy is one artifact whatever number of parts it has. A restore has to put back a set of parts taken at the same moment, and a copy per part makes a mismatched set possible — a database from Tuesday with uploads from Friday is worse than either alone. A copy carrying different parts than the product being built restores is refused when it arrives, naming what is missing and what is extra.

A product with no durable data of its own declares neither list. The pass reports that as "nothing to copy" rather than as a failure — counting it as one would teach a platform admin to ignore the number.

A dump is ciphertext without its key. A tenant's data-at-rest key is sealed in its escrow record, so the copies and the escrow records are deleted together, always: a key kept after the dump is gone protects nothing, and a dump kept after the key is gone is a file nobody can restore.

Where copies go, and for how long​

The destination is the deployment's to choose, and it should not be the machine that holds the control plane. That machine also holds the ledger and the escrow private key, so losing it would lose all three together — which is the one failure a backup exists to answer. The control plane says so itself: a condition is raised whenever the destination is on the filesystem the service runs on, or missing entirely, which is also what a mount that failed to come up leaves behind.

Keeping the destination as an encrypted mount makes it storage rather than a third holder of keys: what lands there is ciphertext, and its password lives somewhere that is neither machine.

Two limits bound what accumulates, and both belong with the thing that makes copies:

  • the newest N copies of a serving tenant are kept and the rest pruned, because copies accumulate at the rate backups are taken and a mechanism without a limit eventually fills the destination that exists to protect the tenants;
  • everything held for a closed tenant is deleted once its retention window has passed, because a window nothing enforces is a promise to keep a former customer's data indefinitely.

How a copy is put back​

The same artifact serves three different acts, which is why there is one shape rather than three:

ActWhat happens
Restorethe tenant's stack is built and each declared part is put back, in the order the product declared them
Movea copy is taken where the tenant runs and handed to the destination, which builds from it
Recover a closed tenantthe copies held for it are restored while its retention window is still open

A product that declares a part it can copy and cannot restore is refused outright: it could be backed up and never moved, and a move would otherwise bring up a stack with the right secrets and part of its data — a customer whose application is up and whose data is gone has no reason to suspect it.

See also​

  • Packaging a product — declaring your data, and what your application should offer its customer about backups.
  • The tenant lifecycle — closure, its retention window, and what a move does with the copy it made.
  • Wrapped secrets — the escrow pair that makes a dump restorable, and nothing else.