Backup and restore
Use a portable archive for current project secrets. Use a full instance backup for disaster recovery across all organizations, including history, roles and database settings.
Portable project backups
Open Backups in the web app to archive all projects you can access, or use Backups inside a project for just that project. The CLI uses the same portable archive format:
clavis backup keygen --out recovery.key
clavis backup --org acme --project web --key-file recovery.key --out web.clvportable
clavis backup --all --key-file recovery.key --out accessible.clvportable
clavis restore web.clvportable --key-file recovery.key
clavis restore web.clvportable --key-file recovery.key --yesStore the recovery key in a different location. These archives require a user login and can include only environments where that user can read secret values. Restores check current write rights and policies. They add new versions in existing projects and environments and leave unlisted secrets in place. Each project commits separately, so a failed multi-project restore can report projects that already completed. Archives contain directly stored current values, comments and tags, with folder paths preserved when the destination folders exist. Expired values are skipped and restoring never extends an existing expiration. Histories, resolved inheritance, overlays, shared sets and permissions require an instance backup. Portable archive requests require HTTPS or a loopback connection. For HTTPS termination at a reverse proxy, configure Clavis's trusted proxies and set X-Forwarded-Proto: https at the proxy.
Full instance recovery
For full recovery, run clavis admin backup-ui --config /etc/clavis/clavis.yaml on the host that can access the database and root key. It opens a private loopback browser interface. Add --allow-restore after stopping Clavis and its workers. This GUI limits archive uploads to 256 MiB. Use the CLI for larger archives. Full backups contain the database, including every organization. Keep configuration and the root key separately. Restore PostgreSQL into an empty database. SQLite keeps a copy of the previous database.