Outline backup and restore

Pair the PostgreSQL backup with Outline’s local filesystem or S3 objects, and retain the original application secrets.

Last updated

On this page (5)

Outline · Backup and restore

Before you start

  • Matching Outline release.
  • Access to PostgreSQL, deployment secrets and the configured upload backend.
  • An isolated test hostname, identity configuration and storage location.

Procedure

  1. Pause application writes and capture pg_dump -Fc -f outline.dump <source_db> using the connection defined by the deployment.
  2. Copy local uploads from FILE_STORAGE_LOCAL_ROOT_DIR (official sample: /var/lib/outline/data) or back up configured S3 objects. Capture the effective environment, including SECRET_KEY, in protected storage.
  3. Run pg_restore --exit-on-error -d outline_test outline.dump in a new database with matching roles. Restore uploads to a test location, keep the original SECRET_KEY, update URL/database/storage/identity settings to test values and start the same version.

Verify the result

  • Check a private collection’s access rules, document versions and an inline image or file download.
  • Verify test identity and storage settings do not mutate production services.

Official documentation

Have Pilae operate Outline

We agree what to monitor, how to recover and who responds when something breaks. Bring your existing deployment or start with a new one.