Backup verification
Backup verification checks stored backup material against specified integrity and completeness rules.
A passing check does not prove application recovery. PostgreSQL 18 pg_verifybackup checks the manifest, files and required WAL, not WAL coverage to every later target. WAL parsing needs matching-version tools and plain backups; tar requires --no-parse-wal. Record --skip-checksums and --ignore. It excludes postgresql.auto.conf, standby.signal and recovery.signal. [1]
Freshness: four SQLite 3.45.1 copies completed and passed integrity_check with 64 rows. A retained WAL read snapshot copied generation 1 despite generation 2 committing before copying. Full values revealed the difference. [4]
Completion: in six native API cases, backup_finish returned OK after no step, partial copying or completion. All reopened destinations passed integrity_check; only SQLITE_DONE controls replaced the old generation in both source journal modes. Retain terminal step status, not cleanup alone. [5]
Selection: rsync --append-verify skips equal-length and longer destinations even with --checksum or --ignore-times. Fourteen of 30 designed rsync 3.2.7 outputs differed despite exit 0; checksum-only controls matched all five inputs. [6] [7]
Dependencies: Git full fsck can use external objects and accept promised absence in partial clones. In Git 2.43.0, HEAD checkout left history unavailable offline; connectivity-only checks omit blob contents. A changed bundle trailer passed verify but failed unpacking. Test offline content and intended history. [8] [9] [11]
Permissions: rsync -a preserved bytes and mode 0660 but lost a named-user ACL and broadened the owning-group entry in Linux controls. -aA preserved the ACL. Verify identities and full ACLs separately. [10]
Relations
- related
- Backup manifest, Restore test, Incremental backup, Storage immutability, Data scrubbing, Backup, Recovery point objective, Recovery time objective, Point-in-time recovery, WAL archiving, RocksDB BackupEngine, SQLite WAL end mark, SQLite integrity_check, SQLite foreign_key_check, Provable data possession, Proof of retrievability, Git alternate object database, Git bundle, POSIX access control list, Git partial clone, WARC revisit record, TIFF image file directory, SFTP
Advantages
- Can identify missing or altered files before recovery is attempted. [1]
Limitations
- Does not replace a restore test. [1]
- A result is conditional on a trustworthy manifest. [2]
- In Git LFS 3.4.1 controls, default fsck passed with an old payload missing or a missing path excluded. Required revision and path coverage must be checked separately. [12, 15]
- In a constructed Git LFS 3.4.1 size mismatch, a correct 25-byte object passed checks while its pointer declared 26 bytes. Checkout returned 0, left a pointer and removed the cached object. Verify digest, length and materialized bytes on a disposable store. [13, 14, 15]
- A clean Git checkout and matching conversion-aware hash can coexist with changed literal bytes and values. Verify the intended transformation policy and independently expected output. [16, 17]
- A verified source tag does not authenticate an independently selected archive member inventory. Preserve required paths and trusted output expectations. [18, 19]
- SFTP resume assumes an already matching prefix. In Ubuntu 9.6p1 / upstream 10.6p2 controls, altered prefixes survived with exit 0, including with -f; injected remote fsync errors also coexisted with exit 0 and exact-byte overwrites. [20, 21, 24]
- After denied WRITE with FSETSTAT allowed, tested 10.6p2 clients left the expected 8,192-byte length with a zero-valued tail; 9.6p1 clients left zero bytes. Both failed. Length alone does not verify transferred content. [22, 24]
- A manifest or comparison drawn from the exporting role's restricted view can omit the same required rows as an explicitly RLS-filtered export. Verify intended scope with an authorized, snapshot-aligned inventory. [25, 26]
Citations
- PostgreSQL 18: pg_verifybackup, checks and exclusions
- PostgreSQL 18: pg_basebackup, manifest checksums and trust
- Hesela: SQLite backup source-snapshot experiment, observations and limits
- Hesela: Six-case SQLite native backup completion experiment, observations and limits
- Hesela: 30-case rsync append-selection observations and reproduction provenance
- Rsync 3.2.7 manual: append and append-verify
- Hesela: Git backup dependency and verification controls
- Git v2.43.0: full and connectivity-only object checks
- Restoring Linux ACLs: identical bytes, different permissions
- Hesela: Git partial-clone offline recovery controls
- Git LFS v3.4.1: revision and path scope of fsck
- Git LFS v3.4.1: object hash checking
- Git LFS v3.4.1: size checking during materialization
- Hesela: Git LFS history and pointer-size recovery controls
- Git v2.43.0: checkout/check-in conversion and filter requirements
- Git v2.43.0: path-aware hashing and --no-filters
- Git v2.43.0: archive attributes and commit labels
- Hesela: three separately scoped Git recovery-identity studies and runnable evidence
- OpenSSH 10.6p2: SFTP resume precondition and synchronization options
- OpenSSH 10.6p2: upload status, high-water accounting and fsync return handling
- OpenSSH 10.6p2: request denial, size updates and synchronization status
- Hesela: SFTP client/server controls, exact payloads and reproducible evidence
- PostgreSQL 16: pg_dump and explicit row-security filtering
- Hesela: PostgreSQL 16.15 row-security backup controls and exact transcripts
Further reading
- Hesela: Backup verification is not a restore test
- OpenSSH 10.6p2: fsync@openssh.com file-handle extension
Sources & caveats
- The LFS observations use synthetic local fixtures on Git 2.43.0 / Git LFS 3.4.1, not field rates, current-version guarantees or a new-vulnerability claim. [15]
- Git representation evidence: 32 view observations, 24 signed exports and 40 checkouts on one Git 2.43.0 implementation. Deliberate controls, not one combined experiment, field rates or a new vulnerability. [19]
- SFTP: 18 constructed cases per client/server pairing, 72 observations and one repeat on one host. Direct pipes without SSH transport; injected fsync/EIO, not media faults, power-loss tests, field rates or independent replication. [24]
- RLS evidence uses two fresh private clusters, 15 export and four destination controls per cluster, four synthetic rows and one host/build. No concurrency, ACL-preservation, field-rate or new-defect claim. [26]