{
  "slug": "physical-backup",
  "term": "Physical database backup",
  "aliases": [
    "physical backup"
  ],
  "definition": "A physical database backup preserves or reconstructs native database files or pages together with the recovery information required by the engine.",
  "note": "Physical describes the stored representation, not whether capture is full or incremental. PostgreSQL 18 pg_basebackup supports both; an incremental result must be combined with its required predecessors before use. [pg-basebackup]\n\nUse an engine-supported capture procedure, not an uncoordinated live file copy. PostgreSQL filesystem backups require shutdown or a documented alternative; running-server snapshots need the complete cluster and required WAL. [pg-file]\n\nPortability is format-specific. PostgreSQL file backups are server-version-specific, while SQLite database files are cross-platform and backward compatible within SQLite 3; forward compatibility is not complete. Check the reader and schema features. [pg-sql-dump] [sqlite-format]\n\nSQLite's Online Backup API copies database pages through an explicit completion protocol. Physical capture is not necessarily offline capture, and completion is separate from application-level restore testing. [sqlite-api] [hesela-backup-evidence]",
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-29",
  "advantages": [
    {
      "text": "PostgreSQL base backups provide a native cluster baseline for WAL-based recovery when the required logs are retained.",
      "citationIds": [
        "pg-pitr"
      ]
    }
  ],
  "limitations": [
    {
      "text": "For PostgreSQL snapshots spanning data, WAL or tablespace filesystems, captures must be simultaneous or use another supported procedure.",
      "citationIds": [
        "pg-file"
      ]
    },
    {
      "text": "PostgreSQL pg_basebackup includes regular configuration files in the data directory and tablespaces; configuration elsewhere needs separate backup coverage. WAL replay does not restore manual changes to postgresql.conf, pg_hba.conf or pg_ident.conf.",
      "citationIds": [
        "pg-basebackup",
        "pg-pitr"
      ]
    }
  ],
  "related": [
    "logical-backup",
    "backup",
    "full-backup",
    "incremental-backup",
    "backup-verification",
    "restore-test",
    "point-in-time-recovery",
    "wal-archiving",
    "sqlite-online-backup"
  ],
  "citations": [
    {
      "id": "pg-basebackup",
      "title": "PostgreSQL 18: pg_basebackup, full and incremental cluster capture",
      "url": "https://www.postgresql.org/docs/18/app-pgbasebackup.html",
      "accessed": "2026-10-29"
    },
    {
      "id": "pg-file",
      "title": "PostgreSQL 18: File System Level Backup",
      "url": "https://www.postgresql.org/docs/18/backup-file.html",
      "accessed": "2026-10-29"
    },
    {
      "id": "pg-sql-dump",
      "title": "PostgreSQL 18: SQL Dump, comparison with file-level backup",
      "url": "https://www.postgresql.org/docs/18/backup-dump.html",
      "accessed": "2026-10-29"
    },
    {
      "id": "sqlite-format",
      "title": "SQLite: Single-file Cross-platform Database and compatibility",
      "url": "https://www.sqlite.org/onefile.html",
      "accessed": "2026-10-29"
    },
    {
      "id": "sqlite-api",
      "title": "SQLite C API: Online Backup API and completion",
      "url": "https://www.sqlite.org/c3ref/backup_finish.html",
      "accessed": "2026-10-29"
    },
    {
      "id": "pg-pitr",
      "title": "PostgreSQL 18: Continuous Archiving and Point-in-Time Recovery",
      "url": "https://www.postgresql.org/docs/18/continuous-archiving.html",
      "accessed": "2026-10-29"
    },
    {
      "id": "hesela-backup-evidence",
      "title": "Hesela: SQLite backup completion and recovery acceptance",
      "url": "https://hesela.com/analyses/backup-verification-is-not-a-restore-test/",
      "accessed": "2026-10-29"
    }
  ]
}
