Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Backup and restore

A usable backup contains more than PostgreSQL.

Recovery boundary

Back up together:

  • the Code as Usual PostgreSQL database;
  • the complete persistent data root;
  • application configuration and encryption keys;
  • SSH host key and paired-device state;
  • private environment homes;
  • runtime artifacts that cannot be reconstructed from an immutable release.

Treat the backup directory as a credential-bearing secret. Encrypt it at rest, restrict access and protect copies outside the application host.

Maintenance backup

Stop or quiesce application writes, then use the release’s packaged backup tool. Record the application version, database schema and archive checksum with the backup.

Restore test

A backup is not accepted until it has been restored to an empty, isolated host. Verify login, workspace and project access, an environment’s files and private home, terminal start, Git metadata, preview, SSH identity and one runtime package. Perform this test on a schedule and after major storage changes.