oz0 server restore

Restore an archive from `server backup` into an empty database: --db-file (or OZ0_DB) for a cluster, or a new dev data directory with --dev --data-dir.

For: Operators and developers looking up a command.

Restore an archive from server backup into an empty database: --db-file (or OZ0_DB) for a cluster, or a new dev data directory with --dev --data-dir. It checks every file's digest, and that the master key unseals the backup's CAs, before it writes anything. Then it inserts every row in one transaction and migrates to this binary's schema.

Nodes keep their certificates and reconnect; operators get new credentials with server operator issue, which a dev server does by itself when it starts. With --erasure-ledger, every erasure the ledgers recorded after the backup was taken is applied again before any server takes a job; a line that does not verify with the master key is reported and never applied.

Usage

oz0 server restore FILE --master-key-file KEY [flags]

Flags

FlagTypeDefaultDescription
--data-dirstring~/.local/share/orchestrator-zeroserver data directory
--db-filefilea file (- for stdin) holding the PostgreSQL URL of the management database, such as postgres://oz0:PASSWORD@db:5432/oz0 (or set OZ0_DB); the URL can carry a password, so it never goes on the command line
--devboola dev server's data directory (--data-dir) instead of a cluster's database
--erasure-ledgerstringArrayan erasure ledger of the cluster's management servers, whose erasures after the backup are applied again (repeatable)
--master-key-commandcommanda command that unwraps the master key from --master-key-file when the file holds it wrapped, such as with an HSM or a KMS: "COMMAND unwrap" prints the key from the wrapped document on stdin, "COMMAND wrap" wraps one, "COMMAND describe" says what holds the wrapping key (see the docs on key commands) (or set OZ0_MASTER_KEY_COMMAND)
--master-key-filestringthe master key of the cluster the backup is from

Inherited flags

FlagTypeDefaultDescription
--contextstring$OZ0_CONTEXT or <config dir>/orchestrator-zero/context.jsonCLI context file written by server init
--log-levelstringinfolog level: debug, info, warn or error

See all oz0 commands and the global flags.

On this page
Copyright © 2026