Operations
Upgrade and backup
Upgrade
Available With the install script. Run the install script
again (set PODOS_VERSION=vX.Y.Z to pick a version; it needs a published
release, or a binary you built, given with PODOS_BINARY). It prints what
it will change, then:
- replaces the binary, keeping the old one as
/usr/local/lib/podos/podos.previous; - updates the pinned
crun,conmonand BuildKit when their versions changed; - restarts the daemon. Containers keep running. The built-in proxy runs inside the daemon, so HTTP traffic on your domains pauses for a moment.
Before it touches anything, it asks the new binary whether it can use the
existing state database (podos setup --check-state). A downgrade across a
database schema change is refused, with nothing changed: an older binary
cannot read a database that a newer one migrated.
If the new daemon fails to start:
- when it had not migrated the database, the script puts the previous binary back and starts it;
- when it had already migrated the database (the daemon wrote
state.db.before-v<N>first, see below), the previous binary cannot read it. The script stops, leaves the daemon stopped and prints the exact commands to go back: stoppodos, deletestate.db-walandstate.db-shm, copystate.db.before-v<N>overstate.db, copypodos.previousover/usr/local/bin/podos, startpodos. Containers are not touched.
If podos setup fails during an upgrade (when you passed arguments after
--), the script starts the daemon again and says that your settings were
not applied.
Uninstalling keeps your data; see Uninstall.
By hand, for a binary you copy yourself:
- Build the new binary.
- Stop the daemon. Containers keep running; they are supervised by
conmon, not by the daemon. - Replace the binary.
- Start the daemon. It finds the running containers again.
Available Automatic backup before a schema change. When a new version has
to change the database schema, the daemon first writes a consistent copy of
the state database next to it, as state.db.before-v<N> in the data
directory (mode 0600), where N is the schema version before the change. It
logs each migration. Only the newest copy is kept. If the backup cannot be
written, the daemon does not migrate.
This copy is not your backup: it sits on the same disk as the database and does not hold the secrets key. Keep your own backup of the data directory and the secrets key as described below.
Podos is in early development. Until version 0.1 is released, do not keep data in it that you cannot recreate.
Available The built-in proxy runs inside the daemon, so a daemon restart briefly interrupts HTTP traffic on your domains. Containers keep running: a restart of the daemon does not restart them. Zero-downtime daemon upgrades are a known gap to close before 1.0.
Backup
Available What to back up today:
- The secrets key and the state database, together, from the data
directory (
/var/lib/podos). Secrets cannot be decrypted without the key, and the key is useless without the database. Stop the daemon while you copy them, so the database is consistent. - Available Volume data. Volumes are directories in the server's data directory. Podos does not back them up; use your own tools, and stop the service first if it needs a consistent copy. Removing a service or an environment never deletes volume data unless you ask for it.
- Your manifests, which belong in your application's repository.
Images can be pulled again and need no backup. Container logs are kept only as the last ~10 MiB per container.
Keep the secrets key as safe as the secrets themselves: whoever has the key and the database can read every secret.
Planned · 0.2 Volume backup and restore to S3 or SFTP, and a recovery key
shown once at podos setup and required to restore secrets on a new server.