Skip to content

Analyses / Backup evidence

Backup verification is not a restore test

Updated 2026-11-29 · Evidence review and measured SQLite, rsync, Git, BagIt and OCFL behavior

A clean file check is not evidence that an application has been recovered. Record integrity checks, backup dependencies and restoration results separately. A full scan can also miss a broken lookup: see the cross-study acceptance map.

On this page48 sections

Three questions, three kinds of evidence

NIST distinguishes testing backup reliability and integrity from restoring selected system functions using a sample. Neither step is a substitute for the other. [8, CP-9(1)-(2)]

Comparison of documented checks, not experimental results.

Backup evidence boundaries
QuestionEvidence to retainStill unproven
Are the files intact?Validator, manifest, selected checks and errorsApplication recovery and correct business data
Are dependencies complete?Required predecessors and recovery-log coverageIntegrity of every input and successful replay
Does recovery work?Restored scope and functional acceptance resultsUntested backups, environments and failure scenarios

Before validating a copy, establish how source changes were selected. Our inotify probe shows why an empty event queue cannot establish that a source file is unchanged.

etcd: a working watcher can retain a stale cache

A restored database and a live event stream can disagree with a client's retained view. In our etcd 3.6.16 control, a snapshot at revision 3 replaced a server whose client remembered revision 5. Resuming from 6 delivered new events but left an unchanged key with its old value. Recovery acceptance must include the consumer's state.

The recovery guide recommends a revision bump with compaction for watch consumers. The watch API starts inclusively. Cancellation signals unusable history; the client must still rebuild its view.

Designed native controls: snapshot revision 3, old next-watch cursor 6. Every positive bump also used --mark-compacted. All 4 captures agreed.
BumpRev.EventsOld view
036Cache disagrees
146Cache disagrees
367, 8Cache disagrees
47NoneWatch canceled; relist required
100103NoneWatch canceled; relist required

At equality, bump 3 produced revision 6. Events 7 and 8 arrived, yet the key unchanged after restoration stayed stale in the retained cache. The pinned watcher code rejects with minRev < compactRev, not equality. Marking revision 7 or 103 canceled the same cursor 6. Neither cancellation nor a larger counter restores writes absent from the snapshot.

For this implementation and a known cursor W, a marked boundary C must be strictly greater than W to force this compaction rejection. This is a boundary calculation, not advice to use a minimum bump: real clients' progress may be unknown. The 3.6.16 restore command also rejected bump-without-mark and mark-without-positive-bump in the invalid-option controls.

Test the reset path, not just the stream

Discard the invalid retained view, read the required current range, then watch from that response's revision plus one. This explicit relist/watch control recovered the exact final state in all five cases. Pagination, permissions, concurrent writes and compaction during the handoff require additional tests.

Method: four fresh single-member captures on one pinned build and host, including a clean publication replay. Native watch messages feed a small Python cache model; no Kubernetes informer was tested. A positive heartbeat distinguishes missing earlier updates from a stalled stream. The cursor is deliberately reused across a changed cluster identity; cluster-aware clients may invalidate sooner. These are synthetic inputs to native etcd, not a crash experiment, field-rate estimate or newly discovered vulnerability.

Method and reproduction | Validated results | Code, snapshots and four raw captures | SHA-256. See the restore-test definition and recovery acceptance checklist.

Git backups: disconnect the provider and unpack the bundle

A check can succeed because the original is still helping. Our shared Git clone passed a full object check, then became unreadable when its provider directory was renamed. Every file inside the copy retained the same SHA-256. A separate one-byte bundle mutation passed bundle verify, but failed restoration.

Ten designed cases ran three times on git version 2.43.0. All repetitions agreed. These are controlled interface observations, not failure-rate estimates or a newly discovered vulnerability.

Object availability is not object independence

A Git alternate object database lets a repository borrow objects. A full fsck follows that lookup, so it can pass without the copy containing those objects. [clone] [fsck]

Four bare copies of a two-commit fixture. All passed full fsck and returned the expected 22-byte payload before disconnection. The copy's own files remained byte-identical.
PreparationFull fsck, provider absentRead, provider absent
Shared cloneFailureFailure
Shared + repack -a -lFailureFailure
Shared + repack -a; alternate removedSuccessExpected content
Reference + --dissociateSuccessExpected content

The local-only repack skips borrowed objects. [packing] The full-repack control copied reachable objects before removing its alternate entry. Do not remove lookup configuration from an unexamined production repository. Provider-path independence does not establish separate media or freedom from shared hardlinks.

Connectivity and payload integrity are different checks

We changed one character inside a loose blob, preserved its length, recompressed valid zlib data and kept its old filename. This changed the content hash; it was not a hash collision.

Same outcomes in all three repetitions. The intact and missing-blob controls distinguish content-check coverage from object-presence checks.
FixtureConnectivity onlyFull fsckRead
Intact blobSuccessSuccessExpected content
Changed blob, old object IDSuccessFailureChanged content
Required blob removedFailureFailureFailure

Connectivity-only checking avoids reading blob contents. The full check detected a hash-path mismatch, while reading the changed object returned its altered payload. Successful reads alone therefore did not establish object integrity. [fsck]

A bundle's prerequisites and packed bytes need separate evidence

An incremental Git bundle verified in the source but failed in an empty recipient, identifying the missing prerequisite commit. A complete --all bundle restored the expected history into an empty recipient; the uncommitted working-tree file was absent. [scope]

Complete bundle control versus the same bundle with only the final pack-checksum byte changed; Git 2.43.0.
BundleVerify, empty recipientBare clone
Original complete bundleSuccessSuccess
One changed pack-trailer byteSuccessPack SHA-1 mismatch

In the pinned implementation, verify reads the header, closes the file and checks prerequisites. Unbundling separately invokes index-pack on the payload. This explains the observed boundary; it is not a claim about every later release. [command] [unpacking]

Accept a recovered state, not just a successful command

Test a disposable restoration with original object providers unavailable. Record selected refs, prerequisites, Git version, full-check output and expected-content comparisons separately. An incremental chain needs its prerequisite history; a byte manifest cannot supply dependencies that were never included.

SWEEPER (FAST 2008) separates assembling a candidate recovery image from testing it for corruption. Its evaluation simulated the CDP system and assumed accurate corruption classification. The study used synthetic event-corruption distributions, not a production recovery-success sample. Its false-negative experiment omitted corruption events from checkpoint records; it did not test a checker that incorrectly accepts a corrupt image. Our Git controls illustrate why the checker's scope must be explicit; they do not reproduce SWEEPER's search algorithms or performance. [paper, sections 2, 5.1 and 5.2.4]

Searching recovery history introduces another assumption. SWEEPER's binary strategy assumes that once an image is corrupt, all later images remain corrupt. [section 3.1.2] Hesela's inference: if a repair makes a later image pass the same check, that ordering no longer holds. In a hypothetical clean, corrupt, clean, corrupt sequence, discarding every point after the second image would miss the third, usable image. Before using binary search, justify this assumption for the named acceptance check; otherwise, do not prune untested recovery points on that basis.

Reproduction script / all 30 outcomes and command traces / versioned source hashes. Run python3 observe.py --output results.json --work-root . --repeats 3. The harness creates only disposable local fixtures and refuses an existing result file.

No network transport, partial clones, LFS, submodules, linked worktrees, concurrent writer, device failure or crash durability was tested. Renaming a provider is not a garbage-collection experiment. Repetitions check repeatability, not population incidence.

Git LFS: pointer history is not payload recovery

A Git bundle can preserve the complete pointer history while omitting the separate Git LFS payloads. Our five designed cases on Git 2.43.0 and Git LFS 3.4.1 distinguish Git integrity, LFS check coverage and actual recovered bytes. The pointer contains an object digest and a separate byte count. [pointer format]

Two commits, one LFS path, five local-store configurations. Every case passed full Git fsck and pointer-only checks. Explicit old-commit object checks cleared path exclusions. Object checks used --dry-run to retain corrupt-cache evidence.
Local storeDefault LFS fsckOld-commit fsckCurrent fileHistorical file
Bundle onlyFailFailPointer remainsPointer remains
Latest payload onlyPassFailExact bytesPointer remains
Both payloadsPassPassExact bytesExact bytes
No payloads; path excludedPassFailPointer remainsPointer remains
Latest payload corruptedFailPassNot attemptedNot attempted

The latest-only store passed the default check but could not restore the old file. With the path excluded, that check passed with neither payload available. In this version, default fsck examines HEAD and, for object checks, the index; configured exclusions narrow object checking. It is not an all-history guarantee. [manual] [implementation]

For the missing-content cases, ordinary git lfs checkout returned exit 0 but left pointer bytes and emitted a skipped-content diagnostic. The complete-store control restored both exact files; the corrupted-payload control failed object checking and was not materialized. [per-file handling] [command loop]

Even a correct digest does not validate the declared length

A paired control kept the same correct 25-byte payload and SHA-256, changing only its committed pointer size from 25 to 26 bytes. Git and all three tested LFS checks passed in both cases. The inconsistent-size checkout returned 0, left a 127-byte pointer and removed the initially present local payload object.

Git LFS 3.4.1, two intentionally constructed controls, 25 payload bytes in each. Pointer-only, object-only and default LFS checks all returned 0 with --dry-run. No remote was configured.
Declared bytesCheckout exitOutput bytesPayload restoredCached object retained
25025YesYes
260127NoNo

The pinned checker hashes the object without comparing the copied byte count to the declared size. Materialization uses a different check: it removes an object whose length disagrees with the pointer. Before-and-after inventory confirms removal here; the diagnostic alone would not establish when the object became unavailable. [fsckPointer] [Smudge and SmudgeToFile]

Acquisition scope and acceptance scope must agree

The versioned fetch manual says fetch --all acquires objects reachable from the selected refs and ignores configured path filters. That does not broaden a subsequent default fsck. This comparison comes from documentation, not a remote-fetch experiment. [fetch scope] [check scope]

Our engineering implication is to record required commits and paths, verify each pointer's digest and length, and compare the materialized bytes. Use an independently copied, disposable restoration store, not the sole retained evidence store. These are acceptance boundaries, not a complete backup recipe for arbitrary repositories. See Git bundle and backup verification.

Method and reproduction/ Portable code and evidence package/ Generated table data/ History command traces/ Size-control command traces.

Observed 2026-10-27 and replayed 2026-10-28. Synthetic local fixtures on one installed Git 2.43.0 / Git LFS 3.4.1 build; not a current-version claim, new-vulnerability claim or field failure rate. No server acquisition, crash, hardware or application-recovery test. Replays establish repeatability, not independent populations. The deliberately inconsistent pointer was not produced by the normal clean-filter control.

Which representation did the restore actually recover?

A clean Git checkout can contain different bytes from its stored blob. In our controlled filter example, the CSV value became 99 instead of 10 while status stayed clean and the default file hash matched the original blob. Git compared a normalized representation; it did not certify the value read by the application. This is documented conversion behavior, not a hash collision or a new vulnerability. [attributes] [hash-object]

Ten designed configurations on Git 2.43.0. Each ran in SHA-1 and SHA-256 repositories twice: 40 retained observations. Every row passed strict stored-object fsck. Columns describe the resulting working file.
Checkout policy or controlExitClean statusOriginal bytesDefault hash matches blobCSV value
Unconverted baseline0YesYesYes10
core.autocrlf0YesNoYes10
Explicit LF0YesYesYes10
UTF-16LE0YesNoYes10
Synthetic filter: 10 to 990YesNoYes99
Same filter, required0YesNoYes99
Driver not configured0YesYesYes10
Optional filter fails0YesYesYes10
Required filter fails128NoNoNoNo file
Unfiltered edit to 770NoNoNo77

Newline and UTF-16LE conversion changed bytes while preserving the decoded value. The synthetic clean/smudge pair instead mapped 10 to 99 on checkout and back to 10 for comparison. Requiring a filter only required its success: the successful required filter still produced 99. A required failing filter prevented checkout; an optional failure emitted diagnostics but permitted passthrough. The unfiltered edit to 77 made status dirty and the hash differ, providing a negative control.

git hash-object --no-filters avoids input conversion, but its result is still a Git object ID including the object header, not an ordinary file SHA-256. For byte-exact recovery, compare the literal file against an independently retained expected digest. For intentionally normalized recovery, specify the canonical encoding and value checks instead of rejecting every byte difference. [hash scope]

A valid signature does not fix the export policy

Two separate studies locate earlier boundaries. In 32 replacement-view observations, the same HEAD and passing fsck coexisted with a selected value of 99 instead of the raw original 10. Git replacement references normally affect object lookup but not fsck. Disabling them addresses that boundary only. [replacement rules]

In 24 signed-export observations, verification of the same test-signed tag succeeded while local export-ignore policy omitted the required CSV. This also happened with replacement lookup disabled. A tar commit label identifies an input; it is not a signature over the final archive's member inventory. The signing key was deliberately trusted inside the fixture, not a real publisher's identity. [archive attributes] [tag verification]

Preserve the transformation context

ReproZip (TaPP 2013, sections 3-4) traces exercised system-call dependencies to package workflows, while noting kernel, hardware and absolute-path limits. Foundation (ATC 2008, sections 1-2) archives a VM-backed execution environment alongside files. Our inference: recovering stored content and recovering its interpretation require different evidence. Neither paper is a Git conversion experiment or a guarantee of arbitrary future execution. [ReproZip] [Foundation]

Preserving .gitattributes alone does not preserve the effective policy: $GIT_DIR/info/attributes has higher precedence, and filter commands are configured separately. A configured filter.<driver>.process takes precedence over the single-blob clean and smudge commands. Record the effective attributes, driver configuration and executable dependencies, not only the versioned rules. This is a documented configuration boundary; the checkout experiment above tests single-blob filters, not the long-running process protocol. [attribute and filter precedence]

Record the intended representation, required objects and refs, replacement/export/filter policy, required output paths, expected bytes and application values. A manifest made only from the restored files describes what survived; it cannot independently establish what should have survived. These checks complement the earlier offline-closure and LFS results, rather than replacing them.

Runnable evidence package / method and replay instructions / all three tables and source bindings / six recovery obligations. The package retains the original collectors, command traces and source receipts unchanged.

Separate populations: 32 view observations, 24 signed exports and 40 checkouts. Each used one Git 2.43.0 implementation, two object formats and two repetitions. They are not one combined end-to-end experiment or a failure-rate sample. No hardware failure, submodule or application recovery was tested in these three studies; LFS belongs to the separately described study above.

Partial Git clones: valid does not mean complete offline

A successful git fsck --full --strict did not establish independent recovery in a separate Git 2.43.0 experiment. A partial clone passed with five file-content objects absent. Checking out HEAD fetched two, but three historical objects stayed missing and the required first-version read failed offline.

A Git partial clone intentionally delegates missing-object availability to a promisor remote. The pinned checker recognizes this contract; promised absence is not automatically corruption. That does not make the copy an independent archive. [design] [implementation]

Git 2.43.0; three commits, five distinct blobs. Seven designed configurations, three repetitions each with matching outcomes. Original provider unavailable during checks. Missing counts describe this blob-only fixture, not all possible clone filters.
CandidateMissing blobsFull + strict fsckCurrent fileFirst-version file
Complete clone0PassExact bytesExact bytes
Partial, no checkout5PassRead failsRead fails
Partial, HEAD checked out3PassExact bytesRead fails
Partial, all five blobs fetched0PassExact bytesExact bytes
Partial, one online read4PassExact bytesRead fails
Complete, old blob removed1FailExact bytesRead fails
Shallow complete, depth one0PassExact bytesRead fails

The ordinary missing-blob control failed the checker. The fully materialized partial clone passed both checking and sampled historical reads. Its materialization used a known-complete source inventory; this is a control, not a general repair recipe for clones whose omitted trees can hide further descendants.

A successful read can change the copy being tested

One online read fetched the current file and reduced missing blobs from five to four. The original provider was still doing useful work. Preserve the candidate and test a disposable restoration with providers unavailable; record inventory before and after. In these controls the provider pathname was renamed and Git transports disabled during offline checking. This is not a network-partition test.

Zero reported missing objects does not establish the requested history

git rev-list --objects --all --missing=print can return success while reporting absent IDs prefixed by ?. Inspect those records, not only the exit code. The traversal also has a history boundary. [enumeration]

The depth-one control retained the same branch and tag tips, reported zero missing objects and passed fsck, but lacked the first commit. Shallow history treats its boundary commits as roots; it is distinct from partial-clone object filtering. Identical tip refs do not prove identical history coverage. [shallow representation]

That shallow candidate also returned success from bundle creation, yet a bare clone of the bundle into an empty recipient failed. Complete and fully materialized controls restored the expected current, first-version and deleted-file bytes. This is a version-scoped observation, not a claim that every shallow-bundle workflow fails.

Recovery acceptance: specify required refs and history boundaries independently of the candidate, then test object integrity, dependency independence and expected content separately. A passing check, a working HEAD and a zero missing count answer different questions.

Independence today is not archival compatibility tomorrow

Hutchinson and colleagues distinguish archival recoverability after software or hardware changes from copying data successfully. Their WAFL study contrasts portable logical formats with physical images tied to filesystem interpretation. It does not evaluate Git. [OSDI 1999, sections 1, 3-5]

For this Git experiment, object independence and reader compatibility remain separate acceptance questions. The controls use one executable version; they establish neither cross-version restoration nor preservation of application dependencies outside the selected Git objects.

Method and limits / reproduction script / 21 outcomes and command traces / generated table data / eight pinned source receipts. Run python3 observe.py --output results.json --repeats 3 in a disposable working directory; the harness creates temporary fixtures and refuses existing output.

Observed 2026-10-23 on one Git 2.43.0 build. A second capture reproduced the same 21 outcomes; repetitions are not failure-rate samples. No LFS, submodule, hardware, concurrent-writer or crash-durability result. This extends, rather than changes, the earlier Git experiment's stated exclusions.

Measured: an intact copy can fail relational and application checks

Every one of ten completed backups passed integrity_check and exactly preserved its source rows. Four copies contained a foreign-key violation. Only two met the independent application requirement. Successful copying preserved the input; it did not decide whether that input was acceptable.

Five designed cases ran separately with DELETE and WAL source journals on SQLite 3.45.1. Each database contained two parents and one child. Before creating any database, the experiment defined the required child as row 1, referencing parent 1, with a fixed payload. All row counts were identical.

Same outcomes in both source modes. Every row below passed integrity_check and completed copying; these are designed cases, not sampled incidents.
Constructed inputFK errorsApp rule met
Required parent0Yes
Missing parent, checks off1No
Enable inside transaction1No
Other existing parent0No
NULL parent0No

Three checks answer different questions

SQLite integrity_check excludes foreign-key errors; foreign_key_check reports violations of declared references. [31] [foreign-key check] In the two missing-parent cases, the latter returned the child table, rowid 1, parent table and constraint index 0. A structural-check success was therefore compatible with a broken declared relationship.

A reference to parent 2 and a NULL reference produced no foreign-key violation, but both failed the fixture's requirement. SQLite allows a nullable reference to be NULL. [foreign-key rules] The other-parent case satisfies the schema yet selects the wrong owner for this application. Neither is storage corruption. These examples establish why the recovery oracle must come from the intended application state, not from an assumption that all valid references are correct.

Enabling enforcement is not retroactive validation

In one case, the script explicitly disabled foreign-key enforcement, began a transaction, requested foreign_keys=ON and queried the setting: it was still 0. The missing-parent row committed. Changing this setting during a transaction is documented to have no effect. [enforcement]

After each commit, the script enabled enforcement outside a transaction and verified that it read back as 1. A new invalid insert was then rejected with SQLITE_CONSTRAINT_FOREIGNKEY. The already-stored orphan remained in both affected cases and was faithfully copied. This observed combination separates future-write enforcement from checking existing rows.

Use an explicit recovery acceptance record

For this SQLite example, retain completion evidence, structural results, declared-relation results and application assertions separately. Verify the effective connection setting before writes. Treat an error from a checking command as an error, not as an empty list of violations. Passing all these selected checks still does not exercise an entire application. The separate runtime/index experiment tests a further dependency: identical database bytes interpreted with changed functions or collations.

Reproduction script / complete observations, runtime identity and hashes. Each copy reached SQLITE_DONE, was closed, reopened read-only and compared with every source row. Only the main database was copied; the writer was idle throughout. The script creates disposable fixtures, accepts no production database path and refuses an existing output file.

python3 sqlite-validation-boundaries.py --work-root . --output validation.json

Recorded 2026-10-17. No crash, power interruption, concurrent writer, recovery-time measurement or population failure rate. No sampling confidence interval applies. The recorded library identifies the observation, not a patch recommendation.

A faithful SQLite copy need not repair stale computed values

In Hesela's two-build recovery-copy experiment, completed backups, VACUUM INTO and a compatible-schema INSERT SELECT * preserved historical stale STORED values while integrity_check returned ok. Explicit ordinary-column projection recomputed the controlled fixture. A rejected transfer left an empty table that also passed the check.

Copy completion, agreement with the source, expression consistency and restored completeness answer different questions. The original inconsistency was prepared through an older incremental-BLOB path that the newer tested engine rejects. This does not show that backup causes corruption or that projection is a general repair method. Retain the original and validate the intended application result on an isolated copy; the linked analysis supplies exact versions, SQL, source review and reproducible evidence.

A restored row number can identify different data

In two of eight copy/rebuild cases, a saved reference to row 2 selected gamma instead of beta, although every declared column value survived and integrity_check returned ok. The distinction is between retaining records and retaining the identifiers used outside the database.

The fixture inserted alpha, beta and gamma, then deleted alpha. Its remaining rowids were 2 and 3. A second schema declared id INTEGER PRIMARY KEY, making that identity part of the stored application data. Each operation used a fresh fixture.

Measured SQLite 3.45.1: result of looking up saved rowid 2. All eight outputs passed integrity_check and preserved declared rows.
OperationHidden rowidDeclared INTEGER PRIMARY KEY
Online Backup APIbetabeta
VACUUM INTObetabeta
VACUUMgammabeta
Python iterdump restoregammabeta

Ordinary VACUUM and Python's iterdump() restore renumbered the hidden rows to 1 and 2. The explicit-key controls retained 2 and 3. SQLite documents that an unaliased rowid can change during VACUUM; it should not be an application's durable external identifier. [rowid] The Python 3.12.3 exporter selected declared columns, so its hidden-rowid dump did not carry those numbers. The complete SQL is retained in the observations. [exporter source]

VACUUM INTO did not renumber this fixture. Do not infer identical identity behavior from the similar command names. The SQLite 3.45.1 transfer implementation chooses a new rowid for an unindexed, unaliased table only when the VacuumInto flag is absent; its INTO path retains the source rowid here. This explains the measured difference, not a guarantee for every schema or version. [transfer code] [VACUUM contract]

Check the declaration, not just the primary-key label

Four additional in-memory controls inserted id=100, then inserted a second row with id omitted. Each was exported with Python iterdump() and restored into a fresh database; all recorded mappings survived that round trip.

SQLite 3.45.1: second inserted row, before and after export. All four originals and restores passed integrity_check.
Declarationrowidid
id INTEGER PRIMARY KEY101101
id INT PRIMARY KEY2NULL
id INTEGER PRIMARY KEY DESC2NULL
id INTEGER, PRIMARY KEY(id DESC)101101

INT PRIMARY KEY and column-level INTEGER PRIMARY KEY DESC leave a separate hidden rowid. Table-level PRIMARY KEY(id DESC) with an INTEGER column does alias it. These are documented syntax distinctions, not evidence of corruption. [schema rules]

In these controls, all four declarations report a primary key through PRAGMA table_info; that flag alone does not identify a rowid alias. Check the actual schema and validate the key used by the application. Reproduction script / full observations. These in-memory controls measure SQL behavior, not disk persistence.

The storage explanation is consistent with Gaffney et al., PVLDB 2022, section 2.1.3: ordinary table B-trees are keyed by rowid, while an INTEGER PRIMARY KEY supplies that key. [paper] Their performance experiments are separate from this recovery check.

AUTOINCREMENT remembers only the history in the restored database

Four additional schedules separate deletion from history rollback. In each, beta received committed ID 2. Deleting that highest row and inserting delta reused 2 with an ordinary integer primary key, but allocated 3 with AUTOINCREMENT. Restoring a backup made before beta existed allocated 2 to delta under both schemas.

New ID for delta; previously issued beta ID: 2. All four final databases passed integrity_check.
SchemaDelete highest rowRestore older backup
INTEGER PRIMARY KEY22
With AUTOINCREMENT32

SQLite stores the allocation history in sqlite_sequence. [allocation rules] In the AUTOINCREMENT restore case, the saved sequence was 1, the later source sequence was 2, and the restored copy advanced from 1 to 2. This is a measured consequence of restoring older history, not a violation of the allocator's guarantee within that history. A downstream system that still remembers the old ID 2 needs explicit reconciliation.

Recovery acceptance should check identifier-to-record mappings, not just row counts. Use a declared application key, preserve it in the chosen export, and verify externally held references before resuming writes. For externally issued identifiers, also reconcile the allocation history or use an independently managed namespace that is not rolled back with this database. Adding AUTOINCREMENT alone does not solve that recovery problem. A declared key remains explicitly mutable; its presence does not make application identity immutable.

Standalone experiment / full rows, dump SQL, sequence states, source hashes and runtime identity. Run python3 observe.py --work-root . --output identity.json. Fixtures use DELETE journals and idle writers; destinations are closed and reopened read-only. The in-place VACUUM uses a closed fixture copy. No production database, WAL, crash, power loss, actual external service or failure frequency was tested. Python's exporter is one implementation, not a claim about every SQL dump tool.

PostgreSQL: restored rows are not the allocator state

Read acceptance and next-write acceptance are different recovery checks. PostgreSQL 16 logical replication transfers serial/identity column values with table rows, but does not transfer their sequence state. A readable subscriber is therefore not, by itself, evidence that local ID allocation is ready for a switchover. This is a documented logical-replication boundary, not a claim about physical WAL replication. [replication scope]

Three observations must stay separate: keys present in rows, the sequence's stored last_value and is_called, and values already reserved by live sessions. With caching, last_value can include numbers not yet returned. A setval in one session does not discard another session's remaining cached numbers. Inspecting the shared counter alone cannot establish every client's next allocation. [cache contract] The boolean is_called also matters: it determines whether the next call returns the stored value or advances first. [function contract]

nextval and setval changes are not undone by transaction rollback; ordinary row-snapshot reasoning does not cover them. [isolation exception] In contrast, ALTER SEQUENCE ... RESTART is transactional and blocks concurrent number allocation. These operations are not interchangeable recovery recipes. [restart contract] This distinction does not mean a dump necessarily omits sequences: pg_dump --data-only includes sequence values within its selected scope. [dump scope]

Isolation is a separate contract. Ports and Grittner's PVLDB 2012 paper explains how PostgreSQL 9.1 tracks read-write dependencies and uses safe snapshots for read-only transactions. Its concurrency-control benchmarks do not test sequence restoration. [SSI study, sections 3, 4 and 8] Our interpretation is narrower: a consistent row snapshot is not an inventory of allocator state. PostgreSQL's documented sequence exception remains relevant even when an application requests stronger isolation. We did not run an SSI benchmark.

Measured: seven sequence controls

We ran seven small controls twice on fresh private PostgreSQL 16.15 clusters on one host. The captures agreed in every case below. These are ordered software controls, not fourteen independent samples. The explicit row-copy case did not use logical replication or pg_dump.

Seven configurations, two same-host captures; PostgreSQL 16.15 on x86-64. A and B are separate client sessions.
ControlObserved result
setval(42, true), then rollbackRows: 0; next allocation: 43.
RESTART WITH 42, then rollbackPreviously issued 1; next allocation: 2.
B calls setval(100, true); A has CACHE 5A first returned 1; shared last_value: 5. A next returned 2; B returned 101.
B commits RESTART WITH 100; A has cached valuesA first returned 1; A next returned 100.
B inserts while A retains REPEATABLE READA row count: 1 to 1; sequence last_value: 1 to 2.
Copy explicit IDs into a fresh serial tableEqual rows: true; omitted-ID insert: SQLSTATE 23505. After isolated alignment: ID 3.
Store 42 with different is_called flagsNext allocation: 42 for false; 43 for true.

The failed insert returned 23505, enforcing a uniqueness constraint; it did not silently overwrite a row. Aligning the fixture's counter let its next insert use ID 3, but that isolated step is not a universal repair. The cached cases also show why shared last_value and one client's next value are different observations. The pinned implementation stores cached allocations in backend-local state and detects storage replacement after transactional restart. [PostgreSQL 16.15 source]

Download the standalone source and evidence package, inspect the first raw SQL transcript and second capture, or read the machine-readable result table. Reproduction instructions and limits explain the temporary, TCP-disabled cluster and the unchanged original probe. The verifier checks every result-bearing SQL output. Corpus: PostgreSQL sequence.

For recovery acceptance, inventory the allocator configuration and live writers, reconcile identifiers already issued outside the recovered database, and exercise representative new writes on an isolated restored copy. Do not turn setval(max(id)) into a universal online repair: table maxima do not account for every allocation or external reference, and not all sequences ascend. This checklist is our engineering synthesis of the cited PostgreSQL 16 contracts, separate from the SQLite experiments above. It is not a crash, failover or concurrent-production repair experiment.

PostgreSQL: whose rows did the backup preserve?

A restore test needs an explicit row scope and an observer authorized to check it. In a four-row PostgreSQL 16.15 fixture, a tenant-A account saw two rows before export and the same two after a successful restore. Exact keyed values agreed, but a full-scope check found the other two rows missing. A manifest built from the same restricted view would share that blind spot.

The default export rejects this condition. pg_dump normally requests an error when row security applies. --enable-row-security deliberately permits the visible subset. A tenant-specific export can be correct; certifying it against an unstated full-table target is the mistake. [export contract]

One synthetic four-row table. All explicit exports below restored successfully; the denominator is the full source inventory, not an incident population.
Exporting account and policyDefault exportExplicit filtered exportRestored / required rows
Tenant-A readerErrorSuccess2 / 4
RLS enabled, no policyErrorSuccess0 / 4
Policy allowing every rowErrorSuccess4 / 4

The all-allowing policy still triggers the default guard: its error identifies policy applicability, not a count of excluded rows. Setting row_security=off does not grant access. Owners normally bypass RLS unless forced; a BYPASSRLS role still needs ordinary table privileges. [session setting] [role rules] [16.15 implementation]

Destination permissions are separate. Four additional controls restored into an existing RLS table as a restricted role. Only an INSERT-format dump with pg_restore --enable-row-security loaded the permitted subset; COPY failed there, although it worked in the privileged restores above. Changing row encoding cannot recover rows never exported. [restore contract]

Acceptance record: preserve the intended scope, selected objects, exporting role, policy and ownership/FORCE state, session context and options. Compare with an authorized expected inventory aligned to the export snapshot. A later broader query can include legitimate changes; it is not automatically the correct oracle. No broad privilege grant or disabling RLS is implied.

Measured on PostgreSQL 16.15: two fresh private clusters, each with 15 export and four destination controls, plus a separate publication replay. Four synthetic rows, exact keyed payload comparisons, one host/build and no concurrency. Ownership and grants were reconstructed for the comparison. This tests neither ACL preservation nor physical backup/PITR, and does not estimate field failure rates or identify a new PostgreSQL defect.

Reproduction guide / all control outcomes / executable experiment / first command transcript / second command transcript. See also logical backup and restore test.

Measured: a successful SQLite backup can preserve an older view

A backup can be internally consistent without containing the newest committed data. In our four-case SQLite 3.45.1 experiment, generation 2 was committed before every backup began. A source connection retaining a generation-1 read transaction produced a generation-1 backup. All four copies returned ok from integrity_check after reopening.

Four constructed schedules, 64 rows each. Latest committed generation before copying: 2.
Source stateCopy gen.Check
BEGIN and SELECT before the writer commit1ok
Open source after the writer commit2ok
End the old read transaction before backup2ok
BEGIN before commit, but no database read until backup2ok

Every copy contained exactly 64 rows. Counts alone therefore missed the difference. The script compared every ID, generation and complete payload against the intended source view, then separately compared that view with the writer's committed generation. It also required a final backup progress status of SQLITE_DONE (101) and zero remaining pages. These are software observations on deliberately constructed data, not sampled backup failures.

Why the source connection matters

WAL readers retain their snapshot until the read transaction ends. [27] The version-3.45.1 implementation of sqlite3_backup_step() opens a source read transaction only if one does not already exist, and closes the transaction it opened itself. Our interpretation of that branch explains the retained view; it does not imply a corrupt backup or a SQLite isolation bug. [28]

The control with BEGIN but no earlier database read copied generation 2. Releasing the old read transaction also allowed generation 2 to be copied. A transaction flag or connection age alone is therefore not a freshness measurement. This extends the separate reader-lifetime and checkpoint experiments into the backup path.

Completion, integrity and freshness need separate evidence

At the C API level, sqlite3_backup_finish() returning SQLITE_OK is not by itself completion evidence: the documentation allows it even when copying was not finished. Keep the step result that reached SQLITE_DONE. [29] Python's backup progress callback exposes status and page counters, which our script records. [30] The source-view experiment used completed backups; the separate test below exercises unfinished cleanup.

integrity_check checks database structure and specified constraints, not whether a required application commit is present. [31] Our engineering recommendation is to define the required recovery boundary independently of the backup source connection, then check an appropriate application generation or transaction marker in the reopened copy. Do not manufacture the expectation by reading the same stale view. An intentionally historical snapshot may be exactly right; the requirement decides.

For a current-state backup, avoid accidentally reusing a connection with an old read snapshot. A separate source connection is one option. This does not promise to include commits arriving during or after copying; our writer committed before backup and remained idle throughout it. A fresh connection is not an end-to-end recovery-point guarantee.

Reproduction and boundaries

Four fresh disposable databases, one thread, ordered calls and no concurrent writes during copying. Each uses WAL, 4,096-byte pages, synchronous=FULL and disabled auto-checkpointing. Backup copies one page per step; each destination is closed and reopened read-only. No crash, power cut, latency, recovery-time or production failure-rate claim is made. The recorded library is not a patch recommendation.

Full observations, settings, build identity and hashes (JSON) / Reproduction script (Python standard library). The script accepts only a work directory, creates its own temporary databases and refuses an existing result file.

python3 sqlite-backup-source-snapshot.py --work-root . --output backup-view.json

Recorded 2026-10-17T11:20:39.552659+00:00. No confidence interval: these are designed cases, not a probability sample.

Measured: successful steps can lose backup progress

No lock error does not mean the copy is advancing. In seven controlled schedules, repeated 3 times, writes through another source connection repeatedly reset copying. Every interleaved step returned SQLITE_OK. A retained WAL read view preserved progress but copied an older generation. These are distinct progress and freshness boundaries.

SQLite documents restarting after changes through another connection, with a same-source-handle exception for file databases. Its incremental guide warns that frequent restarts can prevent completion. Counters report the previous step, not a live inspection. [Backup guide] [API contract]

SQLite 3.45.1; 64 rows, 266 source pages. Six interleaved rounds after an eight-page initial step.
Source / writerPages left, rounds 1 / 6Copy / latest gen.
DELETE / Idle256 / 24610 / 10
DELETE / Other connection264 / 26416 / 16
DELETE / Same handle256 / 24616 / 16
WAL / Idle256 / 24610 / 10
WAL / Other connection264 / 26416 / 16
WAL / Same handle256 / 24616 / 16
WAL / Pinned view256 / 24610 / 16

The initial step left 258 of 266 pages. Each external-connection commit was followed by a two-page step reporting 264 remaining, six times in both journal modes. Idle, same-handle and pinned-view controls instead progressed from 256 to 246 remaining. Counters read immediately after a commit, before another step, still showed the previous values. Source page count stayed fixed throughout.

After those six rounds we stopped writing and drained the same backup object. All 21 runs reached SQLITE_DONE, returned OK from finish and passed integrity_check after reopening. Every ID, generation and complete payload matched the specified source-view oracle. Only the pinned-view case retained generation 10 while the writer had committed generation 16.

Why the writer and read view change the outcome

The versioned implementation resets its next-page position when another connection invalidates the copy; same-handle writes can refresh pages already copied. It also retains a source read transaction that the caller already established. [Versioned implementation] WAL snapshot lifetime explains why that retained view need not advance to newer commits. [Isolation] These mechanisms agree with the observations; they are not a new corruption finding.

Our synthesis: a monitor that only counts BUSY errors can miss repeated work. Retain step status and page-counter history, define an independent completion deadline, and validate the required recovery generation after reopening. Deliberately pinning a view changes which state is copied; it is not a free guarantee of the latest recovery point. Same-handle progress is not evidence of zero write overhead. Choosing a strategy requires the application's consistency and availability requirements.

Scope: sequential native C API calls through Python ctypes; six write rounds, not an infinite-run observation. DELETE and WAL sources, DELETE destinations; pinned-read control only in WAL. No overlapping API calls, shared cache, timing, physical I/O, power loss or full application restore was tested. Repetitions establish repeatability, not a failure rate.

Download the driver, tests, complete traces and hashes and method and limits. The driver creates private fixtures and refuses an existing output file. Corpus API record.

python3 observe.py --work-root /tmp --output replay.json

Recorded 2026-10-21T05:22:09.757331+00:00; Linux 6.8.0-146-generic. This installed build is an observation, not an upgrade recommendation.

After backup cleanup, who still owns the source read?

Destroying the backup object did not release a source snapshot opened by our application. In a separate 84-run experiment, both completed and cancelled backups left that read transaction active. Later writes kept growing the WAL, although every PASSIVE checkpoint returned SQLITE_OK. Ending the owned read allowed truncation without closing its connection.

This extends the progress experiment above with fourteen schedules, three repetitions and two builds: SQLite 3.45.1 (distribution source ID ending in alt1) and hash-verified upstream 3.54.1. The same behavior was observed on both. Their compile options differ; this is not an isolated version-effect estimate. The upstream release supplies the source identity, not the experimental result. [Release and source hash]

Constructed 32-row WAL source, 38 pages of 4,096 bytes. Final means after three further commits following cleanup. Each row combines twelve observations: two builds, three repetitions and journal_size_limit -1 or 0, with matching listed outcomes.
Source / actionCopied gen.Read retained?Log / checkpointed framesWAL bytes
No transaction / Complete16No36 / 36148,352
No transaction / Cancel0No36 / 36148,352
BEGIN only / Complete16No36 / 36148,352
BEGIN only / Cancel0No36 / 36148,352
BEGIN + SELECT / Complete10Yes360 / 361,483,232
BEGIN + SELECT / Cancel0Yes360 / 361,483,232
BEGIN + SELECT / No backup0 (untouched)Yes360 / 361,483,232

Generation 0 is the pre-existing destination sentinel, not a successful copy. Completed backups reached SQLITE_DONE and passed full-row checks after reopening; cancelled copies never reached DONE and preserved every sentinel row. The reader-only control retained the same WAL history without creating a backup object. The retained resource was the caller's transaction.

BEGIN is not the same as an established read view

In the BEGIN-only control, autocommit was disabled but the main schema's transaction state was SQLITE_TXN_NONE between steps. After BEGIN plus a full SELECT, it was SQLITE_TXN_READ. Finalizing the SELECT did not end the explicit transaction. [Autocommit] [Per-schema state]

The reviewed 3.54.1 implementation opens and closes a source read for a step only when the step owns that read. Finish cleans up the backup and any outstanding destination transaction; it does not roll back the caller's source transaction. The pinned source and completed copy therefore stayed at generation 10 while the writer advanced to 16. [Backup contract] [Pinned source locators]

Inspect the named database, not only a connection-wide flag

The transaction-state API has another diagnostic boundary: a NULL schema argument returns the highest state across attached schemas, not the state of the backup source specifically. Query the actual source schema; an unknown name returns -1, not SQLITE_TXN_NONE. A state sample does not identify the owner or age of a read. This is an API-contract distinction, not an attached-database experiment in the 84 runs above. [Per-schema state]

A zero journal-size limit did not cap the live WAL

With the pinned read, WAL length was 1,038,272 bytes immediately after cleanup and 1,483,232 after three more commits. Checkpointed frames stayed at 36 while current frames reached 360. TRUNCATE returned SQLITE_BUSY with zero busy timeout. Both journal_size_limit values produced these outcomes. The setting governs retained space around journal completion or WAL reset; it cannot discard frames still required by readers. [Size-limit contract]

The unpinned control still had a 148,352-byte file but no frame backlog. Once our owned read ended, TRUNCATE returned OK and reduced both counters and file length to zero. These are native C return codes, not the PRAGMA's separate busy-indicator column. Checkpointed frames include prior progress within the current WAL cycle. [Checkpoint contract] [WAL investigation]

Engineering consequence: track completion, selected generation, source-read lifetime and WAL reclamation separately. Give the operation an explicit owner for any read transaction it starts, including cancellation and error paths. Do not blindly roll back unrelated work on a pooled connection, and do not delete a live WAL. A freshness or storage budget needs its own measured policy.

Limits: synthetic fixed-size data, ordered single-thread calls and deliberately disabled auto-checkpoints. This reproduces documented behavior, not a newly discovered defect. No timing, physical-I/O, crash, power-loss or application-recovery test was performed. Generations are payload labels, not timestamps. WAL bytes are file length, not device writes. Repetitions establish repeatability here, not failure probabilities.

Reproduce with the method and build instructions, driver, tests and summary generator. Inspect the 3.45.1 trace, 3.54.1 trace and derived table data. Original observations were recorded on 21 October 2026; test reruns are not pooled into them.

A serialized image can preserve a rolled-back transaction

A valid database file is not necessarily a copy of committed source history. In our native SQLite 3.45.1 and 3.54.1 controls, a writer serialized its view after updating one row and inserting another, then rolled back. The source returned to its original data. The detached image still returned values never committed in the source database and passed integrity_check.

The serialization API selects a database on one connection. In the pinned implementations, the ordinary file-backed path reads through that connection's pager. Our observed uncommitted exports are not an explicit promise in the API's short disk-copy description. [API scope] [3.45.1 source] [3.54.1 source] A separate private-cache reader and a backup reaching SQLITE_DONE through that reader retained the base committed rows. This extends the older-view control: the unwanted recovery state can be uncommitted, not only an earlier committed generation.

Selected WAL controls, agreeing on both tested builds. Full two-column rows are shown; each detached disk copy returned integrity_check=ok. These ordered fixtures are not independent field samples.
Image selectedRows on detached disk restore
Writer before rollback[[1, "draft"], [2, "never-committed"]]
Separate reader during write[[1, "base"]]
Completed backup through that reader[[1, "base"]]
Raw main file after commit, before checkpoint[[1, "base"]]
Reader still holding the older snapshot[[1, "base"]]
Reader after ending its snapshot[[1, "committed-next"], [3, "committed"]]

There is a separate restore-path boundary. All nine WAL-header images per capture returned SQLITE_OK from sqlite3_deserialize, but the first query returned SQLITE_CANTOPEN. SQLite documents setting input-buffer bytes 18 and 19 to 0x01 before deserialization. That enabled our reads; it did not certify a commit or reconstruct committed changes absent from a raw main-file copy. The same serialized images were readable as standalone disk databases without the pre-deserialization header edit. [documented restriction] Apply the documented header conversion only to a detached input buffer; it is not a repair procedure for a live database.

Method: 16 image origins per build, two original captures each and three restore paths; 32 retained 8 KiB images. We used private caches, explicit transaction ordering, disabled auto-checkpoint and disabled writer cache spilling. A retained WAL read stayed on the older committed view after another connection committed; ending the read exposed the new rows. Shared cache with read_uncommitted is outside this experiment. [isolation contract]

These are controlled native software observations on one host, not a crash test, power-loss experiment, new SQLite defect or failure-rate estimate. The builds have different compile configurations, so their comparison does not isolate a version effect. Recovery acceptance must establish the intended committed source view, actual query completion and application state separately. A matching hash or structurally valid image cannot establish all three.

Crash consistency asks a different question. Pillai and colleagues' ALICE study reconstructed possible post-crash file states from application update traces and checked workload-specific invariants. Our serialization controls instead test which logical view was exported, without crashing the storage stack. Passing either kind of check cannot substitute for the other; the paper's historical configurations are not a verdict on today's SQLite builds. [OSDI 2014, sections 3 and 4]

Inspect the full machine-readable observations, derived comparison table, method and reproduction instructions and standalone source, tests and image package. Definitions: SQLite serialization and Online Backup API.

Measured: finish=OK after an unfinished copy

A successful cleanup is not a completed backup. In six constructed cases using SQLite 3.45.1, we called the native C backup API through Python ctypes. The source held generation 2 and the existing destination held generation 1 before copying. Both used 64 rows with generation-specific payloads.

Identical outcomes in separate DELETE-source and WAL-source runs. All destinations started in DELETE mode. Three schedules per source mode.
Copy scheduleLast step / finishDest. gen.
No copying stepNot called / OK (0)1
One page, then stopOK (0) / OK (0)1
Copy until doneDONE (101) / OK (0)2

After the one-page step, 137 of 138 pages remained. Calling sqlite3_backup_finish() returned OK; even the destination connection's error code was OK. After closing and reopening read-only, every destination passed integrity_check and contained 64 rows. The unfinished cases still held the old generation, verified by comparing every ID, generation and full payload. Only the completed controls replaced it with generation 2.

What this result establishes

The C API documents rollback of an unfinished destination transaction at finish. This is expected cancellation behavior, not data corruption. Our observation shows why a wrapper must retain the terminal step status, not reduce all evidence to the cleanup return code. [29]

Our acceptance recommendation: require a step that reached SQLITE_DONE, check cleanup errors, reopen the result and verify an independently chosen application boundary. A remaining-page counter is supporting evidence, not a substitute for the terminal result; counters describe the most recent step. Never use the destination connection between successful backup initialization and finish. [29]

Reproduce and interpret narrowly

Six-case observations and build identity (JSON) / Reproduction script. The standard-library harness requires an installed SQLite shared library and creates only disposable databases; it accepts no production database path and refuses an existing output file.

python3 sqlite-backup-completion.py --work-root . --output completion.json

One installed build, ordered calls, no concurrent writer, no forced crash or I/O error. Source journal mode varies; destination mode does not. Logical row equality does not imply byte-identical database files. These are designed API cases, not a failure-rate sample or a full application restore. The version is an observation, not a security or upgrade recommendation.

Gaffney and colleagues' PVLDB 2022 paper explains SQLite's rollback and WAL architecture and evaluates transactional, analytical and blob workloads. Those performance experiments do not test this backup-completion boundary. We use the paper as architectural context, not as evidence that a backup succeeded. [32, sections 2.2 and 4]

Recorded 2026-10-17T12:07:33.933149+00:00. Six constructed schedules; no sampling confidence interval is applicable.

A writable target can still reject the copy

Permission to write is not compatibility with a particular backup. SQLite can return SQLITE_READONLY when a writable destination has different-sized pages and is already in WAL mode or initialized in memory. The error name alone does not diagnose filesystem permissions. [API contract]

Hesela's 240 constructed runs crossed fifteen target profiles, 4096-byte and 8192-byte source pages, DELETE and WAL sources, two repetitions and recorded SQLite 3.45.1 and 3.54.1 builds. Ordinary UPDATE controls succeeded before and after initialized writable mismatch cases, yet copying failed. The old targets retained twelve different rows while matching the source's row count and passing integrity_check. Full ordered row digests distinguished them. [Method and native observations]

Eight of fifteen target profiles; sixteen constructed observations per displayed row, all agreeing within that profile. Settings describe the target before copying. All 240 targets passed integrity_check; remaining was zero after both successful and failed final steps. These are not incident rates.

Destination compatibility controls
Destination before copyUPDATE before / afterStep / finishRows afterwards
Initialized DELETE file; different pagesOK / OKDONE (101) / OK (0)Source rows
Initialized WAL file; different pagesOK / OKREADONLY (8) / READONLY (8)Old target rows
Initialized WAL file; matching pagesOK / OKDONE (101) / OK (0)Source rows
Initialized memory; different pagesOK / OKREADONLY (8) / READONLY (8)Old target rows
Initialized memory; matching pagesOK / OKDONE (101) / OK (0)Source rows
Fresh memory; initially different pagesNot tested / OKDONE (101) / OK (0)Source rows
Schema-empty WAL file; different pagesNot tested / Not testedREADONLY (8) / READONLY (8)Still empty
Read-only file; matching pagesREADONLY / READONLYREADONLY (8) / READONLY (8)Old target rows

Fresh memory could adapt; initialized memory could not. A schema-empty file already in WAL mode also rejected the mismatch. Absence of user tables is therefore not the same as an uninitialized pager. In the additional profiles, a successful page_size setter, including with VACUUM, did not change the tested WAL or initialized-memory target's effective size. [Page-size rules] [Empty-memory example]

Switching the disposable WAL target to DELETE before copying allowed adaptation. With a WAL source, that target later reported WAL again: retain the pre-copy mode as well as the final mode. This is a diagnostic control, not a recommendation to change a live service's journaling policy.

Check target compatibility, terminal copy status, intended data identity and application recovery separately. A fatal READONLY result requires cleanup of that backup handle, not a BUSY-style retry. A progress counter or structural check cannot replace the step result. [Error handling]

Inspect the full fifteen-profile matrix, method and limits and standalone evidence and replay package. File targets were closed and reopened read-only; memory targets cannot be reopened. No concurrent writer, crash, power loss or full-application recovery was tested. Two differently configured builds on one host do not isolate a version effect. This reproduces documented behavior, not a new SQLite defect.

Measured separately: abandoning a locked source

A complementary experiment adds an exclusive source lock to the completion controls above. Immediate abandonment after SQLITE_BUSY returned BUSY from finish too, a build-scoped distinction that the six-case experiment does not test.

The SQLite Online Backup API separates copying from cleanup. The no-step, partial and completed cases below provide controls for the added lock case; they are not pooled with the preceding experiment.

Four controlled cases used SQLite 3.45.1, with 64 constructed rows in each source and destination, distinct generation markers, 4096-byte payloads, 4096-byte pages and DELETE journals. The source occupied 74 pages. After closing the native handles, the experiment reopened each destination read-only, compared every ordered row and ran integrity_check.

Executed results on constructed data. All four destinations contained 64 rows and passed integrity_check; only one contained the source rows.
CaseStep resultFinish resultReopened contents
Abandon before steppingNot calledSQLITE_OK (0)Old destination generation 1
Abandon partial copySQLITE_OK (0)SQLITE_OK (0)Old destination generation 1
Abandon after source lockSQLITE_BUSY (5)SQLITE_BUSY (5)Old destination generation 1
Copy to completionSQLITE_DONE (101)SQLITE_OK (0)Source generation 2

The partial case copied 8 pages, with 66 remaining. The lock case held BEGIN EXCLUSIVE on a separate source connection, then abandoned copying immediately after SQLITE_BUSY. No source records changed during copying.

A version-specific distinction matters: the tested build returned SQLITE_BUSY from both step and finish. SQLite's API prose says transient lock results do not affect finish, whereas the version-3.45.1 implementation returns the stored step result unless it is SQLITE_DONE. [SQLite API] [Versioned implementation] The receipt preserves the observed result and full build identifier, including its alt1 suffix. This is not a claim about every build or a corruption defect.

Acceptance should retain the observed SQLITE_DONE, finish result and content checks. A lock result can be retried; the documented incremental example keeps stepping instead of treating cleanup as proof of success. [Backup guide] Structural validation has a separate purpose. [Integrity check]

Reproduce with the Python driver; it calls the native C API through ctypes, not Python's backup convenience method. The machine-readable receipt records return codes, row hashes and environment identity. These are deterministic API observations, not a performance benchmark, failure-rate estimate, power-loss test, source-freshness guarantee or full application recovery test.

What PostgreSQL checks

After recovery, successful row counts and small field samples still leave a coverage question. Our separate PostgreSQL 16.15 experiment shows how TOAST length and prefix reads can succeed despite a damaged later value page. Full reads, structural checks and trusted-content comparisons have different roles.

PostgreSQL 18's pg_verifybackup compares a base backup with its manifest and can parse required write-ahead log (WAL) records. Extra WAL outside that requirement is not checked. WAL parsing needs matching-version tools and plain-format backups; tar verification requires --no-parse-wal. Record exclusions, including --skip-checksums. None of this executes recovery. [1]

The check deliberately excludes postgresql.auto.conf, standby.signal and recovery.signal. A passing result therefore does not attest to the intended recovery configuration. [1]

The manifest's WAL ranges specify a timeline and replay boundaries. This implies that their minimum end position is not proof that the archive reaches a later recovery target. [6] A point-in-time recovery also needs the appropriate continuous WAL sequence. [3]

An intact file does not preserve every reader decision

In our Avro reader-policy experiment, the same complete container yields zero, minus one or a schema-resolution error for an absent field, depending on the supplied reader schema. Those readers share both Rabin and SHA-256 parsing fingerprints because canonicalization omits their default policy; this is not a hash collision.

State whether recovery must reconstruct historical application values or intentionally migrate them. Retain the intended reader schema and conversion context alongside the writer schema and expected values. This is an Avro-specific recovery inference, not a new PostgreSQL manifest requirement. The linked study contains both libraries' original observations, present-field controls, source review and reproduction files.

Scherzinger et al. (2013, section 6) describe load-time migration separately from batch migration: their Objectify example renames a property when loading and persists the new shape on a later save. This is a model and language-design discussion, not an Avro experiment. For a historical restore test, verify expected values before any upgrade logic runs; test the intended post-migration values separately. [Schema evolution study]

CSV restoration: all rows survive, but missingness changes

The CSV definition separates field syntax from interpretation; the import checklist connects encoding, headers and exact values.

In Hesela's 12-record optional-text fixture, default CSV export and import changed one SQL NULL into empty text. All 12 rows remained and SQLite integrity_check returned ok, but COUNT(value) rose from 11 to 12. Rewriting the restored values produced the same bytes as the first export. That export had already lost the distinction; this was not a hash collision or damaged database.

CPython 3.12.3 / SQLite 3.45.1. Six policies, each tested with strict parsing off and on: 12 designed paths, not a population sample. Both settings gave the outcomes below. Source: one SQL NULL and one empty string among 12 keyed records.
PolicySQL NULLEmpty textChanged recordSame rewrite bytes
QUOTE_MINIMAL02missingYes
QUOTE_ALL02missingYes
QUOTE_NOTNULL02missingNo
QUOTE_STRINGS02missingNo
Naive backslash-N marker21literal-markerYes
Explicit is_null column11noneYes

Separate export loss, reader loss and rewrite loss

Default and all-field quoting erased the NULL/empty distinction when writing this fixture. QUOTE_NOTNULL and QUOTE_STRINGS retained it in the file, but the measured Python 3.12 reader discarded it. Rewriting that reader's output then erased the remaining lexical evidence. Python documents the reader limitation and its 3.13 fix. [3.12 documentation] [3.13 documentation]

The pinned parsers explain the boundary: 3.12.3 saves strings here; 3.13.0 tracks quoting and maps an unquoted empty field to None in the two null-aware modes. Those pinned implementations are source evidence. [3.12.3 parser] [3.13.0 parser]

We then reread the same retained files on CPython 3.13.16 / SQLite 3.53.1, alongside 3.12.3 / SQLite 3.45.1: 24 read paths per build, covering each original export and its 3.12 rewrite. With QUOTE_NOTNULL or QUOTE_STRINGS, 3.13.16 recovered every keyed value from the original export, but still read the missing value as empty text from the 3.12 rewrite. Both strictness settings agreed. The explicit null-bit control survived both stages on both readers; ordinary quoting and the naive marker remained lossy. Upgrading a reader cannot recover a distinction that the saved bytes no longer contain. Method and comparison / 3.13 typed evidence.

PostgreSQL 17 COPY CSV uses quoting to distinguish its null marker from a matching text value; FORCE_NULL and FORCE_NOT_NULL can change interpretation. We infer that a generic parse/rewrite step can remove information before COPY sees it. No PostgreSQL server was run for this experiment. [COPY contract]

Verify keyed values, not only totals

The separate is_null column preserved all keyed values in the positive control. Naive marker replacement did not: legitimate backslash-N text became NULL. The null-bit decoder rejects invalid flags, duplicate IDs, wrong column counts and nonempty null payloads. It is an illustrative optional-text contract, not an authenticated or general typed format.

Even matching null and empty counts can conceal a swap between records. Retain original bytes, identity, schema, null convention and reader version; compare each restored typed value. CSVW metadata can declare missing-value markers, but cannot reconstruct a distinction already erased. [CSVW primer] Numeric-object fidelity, field failure rates and power-loss recovery were not tested.

Missingness statistics depend on the reader

Mitlohner and colleagues' 2016 open-data study makes this boundary explicit: its R analysis used preprocessed single-header files, limited to 10,000 rows and 100 columns. In section IV-B, column completeness counts values read successfully; unreadable entries become NA and are removed. These are reader-dependent observations, not a measure of backup fidelity. [OBD 2016, sections IV and IV-B]

Hesela's implication: compare typed values against an independently retained source before accepting completeness statistics as recovery evidence. The historical survey does not estimate how often the CSV loss demonstrated here occurs in production.

Complete reproduction package/ all typed observations/ file hashes/ six primary-source receipts/ method and limits. Unpack the package before running the commands. Exact replay requires the captured runtime. The original script is frozen 3.12 evidence; use the supplementary cross-reader script for 3.13 because an unquoted auxiliary token makes the original probe fail under QUOTE_STRINGS.

python3 observe.py --verify results.json
python3 -m unittest -v test_observe.py test_packet.py
python3 cross_reader.py --verify cross-reader-312.json
python3.13 cross_reader.py --verify cross-reader-313.json
python3.13 -m unittest -v test_cross_reader.py

Observed 2026-11-01 on the two named builds on one host. Original 3.12 evidence is unchanged; both cross-reader captures replay exactly. Python values differ before SQL binding, but the interpreter and SQLite versions both changed, so this is not a single-variable binary experiment. This reproduces documented behavior, not a new defect discovery. PostgreSQL remains source-only; no independent peer replication is claimed.

Arrow IPC: intact batches can decode to different labels

Preserving record-batch bytes does not preserve their meaning without the applicable dictionary state. In a controlled PyArrow 21.0.0 reconstruction, a stale dictionary preserved an 880-byte stream, six rows, the schema and both complete record-batch messages. Reading and full validation passed, but three labels changed. This is a deliberately wrong reconstruction, not a new vulnerability or spontaneous corruption observed in production.

Both batches used indices [0, 1, 0]. The first dictionary was ["pass", "fail"]; the second reversed those labels. Replacing the second dictionary message with the first changed the last three decoded values from ["fail", "pass", "fail"] to ["pass", "fail", "pass"]. The indices remained valid. Arrow's format makes dictionaries part of interpretation, not just an optional compression hint. Do not reconcile batches by comparing raw indices: decode the values or remap both batches to a verified common dictionary first. [Versioned format]

Selected synthetic Arrow 21.0.0 controls, six intended rows. All changed streams retain both complete record-batch messages from their corresponding source. The delta control uses the separately retained prefix-extension source. Not decoded means values were not inspected after rejection.
StreamBytesReadFull validationIntended values
Original dictionary stream880PassPassMatch
Replacement omitted680PassPassDifferent
Stale replacement, same length880PassPassDifferent
Initial dictionary omitted680RejectNot reachedNot decoded
Required delta omitted680PassRejectNot decoded

The rejection controls matter. Removing the initial dictionary stopped reading. Removing a required delta let reading finish but full validation rejected an out-of-range index. Retain structural validation; add an independently retained expectation of the intended values and dependencies. These checks answer different questions.

Completion also needs an intended record inventory

In the separate fifteen-case integer study, removing the entire second batch left three rows that read and fully validated. Removing only optional EOS retained all six values. The format permits stream termination at input closure. Reordering or duplicating a batch instead preserved six rows and original length while changing ordered values. [Stream framing] [Original integer observations] Unlike the Parquet prefix example, a well-formed shortened Arrow stream can finish without a later error.

Stream-to-file conversion has a call boundary

File-format dictionaries cannot be replaced. In the native writer controls, unify_dictionaries=True succeeded for one write_table containing both batches, remapping the second indices to [1, 0, 1] and preserving labels. It did not make two separate write_batch or write_table calls succeed. An enabled prefix delta worked; reordered dictionaries did not. This agrees with the option's table-local scope and the pinned writer. [Options] [Implementation]

Recovery implication: bind the intended identity, generation, message order and effective dictionary state. For exact preservation, compare a complete-object digest retained from the intended completed producer under a defined trust policy. Hashing the wrong reconstruction afterwards cannot recover that expectation. If re-encoding is allowed, specify semantic equivalence separately: these dictionary controls compare only ordered non-null strings, not arbitrary Arrow schemas. This extends the byte and version identity distinction.

Scope: one release and host; nine writer configurations and four reconstructions captured in two processes, separate from the earlier fifteen-case study. Repetition is not independent replication and a constructed case count is not a failure rate. No Flight, crash, performance, null, nested-type or extension-type result is established. Every modified fixture changes the whole-object digest.

IPC stream definition / IPC file definition / Traceable table JSON / Native dictionary observations / Complete reproduction package / Replay instructions and limits. The package retains exact fixtures, both captures, tests, library hashes and source receipts.

A manifest is evidence, not an independent witness

PostgreSQL's manifest is a UTF-8 JSON document. [4] File entries carry paths, sizes and optional checksums; modification timestamps are informational. [5]

The default per-file CRC32C detects accidental changes but is not designed to resist malicious modification. Selecting SHA digests does not help if an attacker can rewrite both files and their expected hashes: the manifest needs a separate trust boundary. [7] Our practical inference: record where the manifest came from and how it was protected, not only whether hashes matched.

BagIt: full validation and per-manifest coverage differ

BagIt packages a directory of payload files with manifests and metadata tags. Completeness checks required structure and file coverage; validity also requires checksum verification. [74, sections 1-3]

Our controlled replay of bagit-python 1.9.0 returned success for a declared BagIt 1.0 package whose SHA-512 manifest omitted one payload file. That file remained covered by SHA-256: changing its bytes caused full validation to reject the package. This is a per-manifest coverage gap, not an unchecked file or a broken hash.

RFC 8493 requires each payload manifest in a 1.0 bag to list every payload file; older versions allowed coverage across manifests. [74, sections 2.1.3 and 3] The pinned implementation compares the combined manifest names with the filesystem, then checks the recorded digests. [75] A command's success and conformance to that version-specific rule are distinct claims.

Twelve constructed cases, three validator modes and 36 completed CLI invocations per run; eight selected cases below. Two six-byte ASCII payload files, SHA-256/SHA-512, one Linux environment. Source commit 861ddacb339d5b92659f0187a402f501d841abbe; original results from 26 October reproduced on 28 October 2026. These are designed controls, not a failure-rate sample or a full conformance audit.

Selected actual CLI outcomes: pass = exit 0; reject = exit 1
Constructed caseFastCompleteness onlyFull
Intact packagePassPassPass
Same-length payload changePassPassReject
Renamed payload, same count and bytesPassRejectReject
Changed covered cataloguePassPassReject
Changed uncovered cataloguePassPassPass
Replaced payload and recomputed manifestsPassPassPass
SHA-512 omits b.txt; BagIt 1.0PassPassPass
Same omission, then b.txt changedPassPassReject

Fast mode checks the aggregate payload byte and file counts; completeness-only stops before hashing. These documented shortcuts explain the rename and same-length controls. [76] Separately, the same catalogue change is detected only when the tag manifest covers that catalogue. Tag manifests are optional; when present, each must cover every payload manifest. RFC 8493 also recommends coverage of the remaining tag files. [74, section 2.2.1] Required catalogue coverage should therefore be explicit in the preservation agreement; payload checks do not establish it.

Replacing a payload and recomputing the manifests passes full validation but fails our independently retained original-content expectation. No collision was constructed. RFC 8493 does not give manifests active-attack authentication. [74, section 5.4]

What to retain with a validation result

Hesela's operational checklist separates the evidence needed for four decisions:

  • Execution: record the validator revision, exact mode flags, exit status and diagnostics. A fast pass is not a checksum pass.
  • Coverage: record the declared BagIt version, compare each payload manifest with the actual file set, and identify required tag files.
  • Identity: retain the intended recovery generation and its trusted content expectation separately from the copy under test.
  • Recovery: record the restore and application checks separately. Agreement with a manifest does not establish that the application can use the data.

All twelve cases, diagnostics, input inventories, source hashes and replay code: observations JSON and offline reproduction package. The package needs only Python 3.10+ and does not touch production files. No power loss, concurrent mutation, Unicode paths, network fetch or other validator implementation was tested; no newly discovered vulnerability is claimed.

OCFL: a valid object can be the wrong recovery version

Oxford Common File Layout records versioned objects. Its inventory maps digests to stored content paths and each version's logical names. New versions can reuse earlier content: copying only the newest directory may omit files needed to reconstruct that version. [specification, section 3.5] [implementation notes, section 3.2.2]

Full validation accepted both our intended v2 object and its intact historical v1 snapshot. A separately constructed object with the same ID and v2 head also passed, despite different content. No hash collision was involved. Selecting a recovery target requires evidence beyond the candidate's internal consistency.

OCFL specifies objects at rest and already discusses retaining digests externally. Its implementation notes distinguish that state from update and recovery operations. These observations illustrate the documented boundary, not a defect in the standard. [specification, sections 3.4-3.7] [implementation notes, sections 3.2.2 and 3.7]

Seven synthetic fixtures; pinned ocfl-py 2.1.0. Two validation modes in two retained runs, 28 CLI calls with matching outcomes. The last column requires full validation AND the independently retained v2 receipt.
CandidateInventory onlyFull objectExact v2 target
Intended v2PassPassAccept
Intact historical v1PassPassReject
Old root inventory; v2 retainedPassRejectReject
Latest payload missingPassRejectReject
Latest payload changedPassRejectReject
Same ID and head; different contentPassPassReject
Same values; reformatted inventoryPassPassReject

Passing inventory.json to this validator checked a standalone inventory; passing the object directory checked the object and its content. All seven standalone inventories passed, including those whose payload was absent or changed. The path selected the scope; digest checking was not disabled. [pinned entry point]

Inventory lookup is not payload verification. Hankinson et al.'s 2019 design paper contrasts reading a consolidated root inventory with opening multiple Moab metadata files. Its operation counts describe indexing and history reconstruction, not a complete read-and-hash of stored content. The paper also notes that the consolidated inventory can be larger. Treat the lookup saving as metadata-access accounting, not constant-time validation or a measured restore speedup. The comparison concerns the earlier design, not a benchmark of OCFL 1.1. [section 2.1, Tables 1-2]

Recovery checks should report which files were read and which target was selected, separately from the metadata lookup needed to locate them.

Recovery acceptance: the experiment combined full object validation with the expected object ID, head and SHA-512 of the exact root-inventory bytes. The receipt was retained outside the candidate directories. Comparing that digest alone would miss damaged payload whose inventory was unchanged. A trusted, current receipt is an explicit assumption, not a service implemented by this experiment.

An old copy is acceptable when that historical state is the intended target: selecting the separately retained v1 receipt accepted the intact v1 control. Conversely, a stale or replaced receipt can select the wrong state. A version label alone does not authenticate content.

Exact-byte binding is deliberately strict. Reformatting identical inventory JSON values and recomputing its sidecars passed object validation but failed the saved byte digest. This is not semantic data loss. Decide whether recovery requires exact bytes or a separately specified equivalence policy.

Backup manifest / method and limits / generated table data / fixtures, native logs and replay package / source provenance. Offline evidence verification uses Python's standard library; a fresh native run additionally needs the package's pinned dependencies.

Observed on one Linux host with Python 3.12.3; a fresh publication replay reproduced all seven outcomes. This is author-side repeatability, not independent replication. No crash, cloud behavior, repository-wide completeness, field failure rate or full application restoration was tested.

Full, differential and synthetic describe different boundaries

A full backup covers the selected data scope, not automatically an entire server. [14] Its label alone does not establish physical independence or application recoverability. SQL Server includes log records needed to recover a full database backup to its completion; later changes require subsequent log backups. [16]

Documented backup semantics, not a performance ranking. Recovery logs and application checks remain separate requirements.

What the backup depends on
Backup typeRepresented dataDependency to establish
FullAll objects in the selected scope [14]Its complete stored representation and recovery requirements
Incremental, dependent formatChanges against a recorded earlier backup [3]That reference and its required predecessors, not simply every intervening date
Differential, SQL ServerChanged extents accumulated since the designated full base [15]The matching base plus the selected differential; earlier differentials are not required
Synthetic fullA full representation assembled from retained backup data [2]Usable output, its recovery requirements and any shared underlying storage

SQL Server's COPY_ONLY full backup does not reset the differential base. Do not select that base merely by the newest full-backup timestamp. [15] Terminology also varies: SNIA's differential incremental backup means changes since the latest full or incremental backup, not the SQL Server meaning above. [18]

Synthesis does not mean the entire job avoids production reads. Veeam's documented Hyper-V procedure takes a new incremental first, then builds the synthetic full from repository data. [17]

The newest incremental backup may not stand alone

An incremental backup refers to an earlier backup, not necessarily the immediately preceding one. PostgreSQL needs all predecessors supplying omitted blocks, plus the recovery WAL. PostgreSQL has no built-in mechanism to track which earlier backups remain necessary for later incremental restores. [3, section 25.3.3]

pg_combinebackup reconstructs a full copy and checks the supplied chain's relationships, not each input's integrity. Verify inputs separately. Its --link option creates hard links: starting a server on the output can change files shared with the inputs. Do not treat that output as an independent disposable restore copy. [2]

Illustrative dependency example, not an executed restore: if I1 references F0 and I2 references I1, reconstructing I2 needs F0 + I1 + I2. If I2 instead references F0 directly, the backup dependency set is F0 + I2. These sets omit the separately required recovery WAL. [3]

Do not generalize a dependent-file chain to every incremental storage design. In restic, a snapshot names a tree whose files refer to stored data blobs. Our inference from that format: restore requires the referenced objects, not chronological replay of earlier snapshots; shared repository data must still remain available. [19]

A new full directory is not a new failure domain

A Linux FICLONE reflink shares storage but isolates later writes through copy-on-write. [20] That differs from the shared-file modification behavior of a hard-linked backup. [2] Hesela's inference: write isolation does not prove independent media or protection from losing the shared filesystem.

PostgreSQL's pg_combinebackup --no-sync skips the final durability wait. Combining backups across a change from disabled to enabled page checksums can also produce invalid page checksums; the tool does not recompute them. Record these choices when validating a synthetic full. [2, Options and Limitations]

Omitting --inplace did not make a hard-linked backup immutable. In our permission-only cases, an archive-mode rerun changed the older copy from 0600 to 0644. Its bytes did not change, so a content-only digest would miss this loss of historical metadata. Adding --checksum did not prevent it. These are reproduced, documented behaviors, not a claim of a newly discovered rsync defect.

Each of eight disposable cases began with an independent source and two backup directories whose file entries shared one inode. We created that sharing using --link-dest and verified device/inode equality before testing. Every file contained 4,109 bytes. A controlled source change preceded the final copy; no writer ran during it.

Eight constructed schedules on rsync 3.2.7, protocol 31. All commands returned 0. Modes are octal; the older file started at 0600. Old and new refer to complete payloads, not timestamps.
Final operationOlder bytesOlder modeDestination
Changed bytes, same size and mtimeold0600old / 0600
Same change, with --checksumold0600new / 0600
Changed bytes and mtime, default replacementold0600new / 0600
Same visible change, with --inplacenew0600new / 0600
Only permissions change, reuse destinationold0644old / 0644
Only permissions change, with --checksumold0644old / 0644
Only permissions change, empty destinationold0600old / 0644
Only permissions change, skip existing filesold0600old / 0600

Why unchanged bytes do not imply an unchanged backup

A hard link is another name for the same file, including its permissions. [link(2)] Rsync's manual warns that an existing destination can receive attribute changes through links to older copies. [rsync: --link-dest] The pinned 3.2.7 generator separates content selection from attribute comparison; its unchanged-content path still applies attributes. This is our source-code interpretation of the measured mode changes, not proof that the distribution binary is identical to upstream. [generator.c]

The content-change control behaved differently: default replacement gave the destination a separate inode and preserved the older bytes. With --inplace, both names exposed the new bytes. The itemized output was identical in these two runs: >f..t...... file. That line alone did not describe the effect on the older backup.

Selection checks and recovery checks are different

Our same-size, same-mtime byte change produced no itemized output and left the destination stale. With --checksum, that same change was copied. The manual distinguishes this pre-transfer selection check from the checksum normally used to verify reconstruction of a transferred file. [rsync: --checksum] Neither result in this experiment establishes an application recovery point or verifies bytes after a power loss.

Controls that help, and what they leave unproven

Copying the permission-only change into an empty destination kept the older file at 0600 and gave the new destination 0644 on a separate inode. With --ignore-existing, the older mode also survived, but the destination remained 0600, out of step with the source. Skipping an update is not evidence that the destination is current.

Our engineering recommendation is to create each recovery point in a new destination, record the source boundary, and validate both content and required metadata before treating it as complete. Do not blindly rerun against a populated, hard-linked recovery point. A fresh directory does not isolate shared storage from media failure, and changes to other metadata fields were not tested.

Reproduce the observation

The Python experiment accepts no source or backup paths and works only in disposable subdirectories. Run it with python3 rsync-hardlink-backup.py --output observation.json; it refuses to overwrite an existing result. The complete JSON record includes commands, itemized output, modes, hashes, inode-equivalence checks, build identity and the script hash.

All eight complete-payload and mode oracles passed, including an independent rerun in regression tests. This is one local, unprivileged Linux environment, not a reliability sample or benchmark. No network, concurrent source mutation, ACL, extended-attribute, crash, cold-media read or power-cut test was performed. The recorded rsync version identifies the observation, not a patch recommendation.

Matching files can still restore the wrong hard links

A content check does not establish which names refer to the same file. In our local rsync 3.2.7 and 3.4.1 controls, -aHc could leave two destination names sharing one file even though their source counterparts were independent. Both restored paths matched the source hashes, sizes, permission modes and modification times.

A later 16-byte write to destination a also changed b. With a hard-linked --link-dest basis, it changed the older basis too. These writes were confined to disposable fixtures, never real backups. The manual explicitly permits extra destination links and bounds hard-link recognition to the transfer set. [Pinned manual]

Selected full-tree controls. Outcomes agree in both tested builds and all repetitions. Every row matched payloads, sizes, modes and mtimes.
Initial state / policyRequired grouping restored?Write to a also changes b?
Separate source; linked target / -aHcNoYes
Same setup / -aHIYesNo
Separate source; empty target, linked basis / -aHc --link-destNoYes
Same basis copied / -aHc --copy-destYesNo
Linked source; empty target / -aHYesYes

The intended-linked-source control matters: removing all sharing is not an exact restore either. Forced replacement and --copy-dest are comparisons within these fixtures, not universal repair commands. The earlier metadata experiment also shows why omitting --inplace does not protect existing aliases from metadata-only changes.

Partial selection can hide the wrong outside peer

In a separate study, source a shared its file with source b. Destination a instead shared with outside/retained; destination b was independent. Selecting only a with -aHc matched its payload, measured attributes and link count of two. Inside the selected set, both manifests contained only the singleton group a. Yet a later write changed the outside file, not b.

Wrong-peer fixture, both builds and all repetitions. Selecting both names repairs the internal pair but need not remove the outside link.
Selection / policya and b share as required?Write to a changes outside file?
a only / -aHcNoYes
a and b / -aHcYesYes
a only / -aHINoNo
a and b / -aHIYesNo
a and b / -aHI --inplaceYesYes

Record relationships and the observation boundary

Zwicky's LISA 2003 study used constructed directory trees, a backup/restore round trip, and separate content and metadata comparisons. Its results depended on versions, operating systems and filesystems; they are not a current product ranking. Hesela applies that testing principle to a narrower question: whether restored names retain the intended relationships. We do not reproduce the historical suite or infer a production failure rate from these fixtures. [LISA 2003, Running the Tests and Conclusions]

Equal link counts cannot identify the right peers. Separate native four-name controls compared all three pairings against each other: all nine comparisons had equal payloads and per-path counts, but only the three identical pairings had equal groups. These are designed cases, not a failure rate.

Hesela's proposed acceptance record adds the captured path set, intended hard-link groups and treatment of links crossing that set's boundary. For stable local regular files, group names by observed device/inode identity and compare those groups, including singletons. Do not compare raw inode numbers between copies. This is a recovery recommendation, not a change to PostgreSQL's manifest schema or BagIt.

Under complete, quiescent enumeration with trustworthy link counts, st_nlink - names in the observed group counts directory links outside the set. A positive remainder does not identify their names; equal remainders do not establish matching peers. Zero does not prove isolation from open handles, bind mounts, shared credentials or media. Concurrent traversal requires its own consistency boundary. [link] [stat]

A link count is not an inventory of names or open users. Linux reports it as st_nlink or stx_nlink. Removing the last name can leave an ordinary local file usable through an existing open descriptor; zero therefore does not prove that the file is unused or its storage reclaimed. [inode] [unlink]

For restore checks, record whether a count describes a symbolic link itself (lstat()), its target (stat()), or an already opened object (fstat()). These are different observations. The regular-file remainder above is not a general directory-size formula: ext4 documents DIR_NLINK using i_links_count = 1 when a directory's hard-link count is unknown. Do not interpret that sentinel as one child or one ordinary file alias. [stat] [ext4 directory counts]

This is a source-based interpretation boundary, not another result from the rsync fixtures. Keep a quiescent or separately coordinated namespace view when comparing file groups; a count alone cannot establish the intended sharing relationship.

Method: the full-tree population has 8 scenarios x 5 policies x 2 builds; the selected-restore population has 5 scenarios x 2 selected sets x 4 policies x 2 builds. Each has 80 configurations, two repetitions per capture and two captures: 320 rsync invocations per population. Nine four-name controls were captured separately twice. Commands, hashes, identities, selected input and later-write observations are retained. Repetition checks repeatability, not incidence or independent-host generalization.

Reproduction guide and package inventory / full-tree observations / selected-restore observations / package checksums. Run both Python test suites and generators from their documented working directories. The scripts accept no production backup-tree path.

Local Linux/ext4 fixtures with quiescent sources; constructed data, native filesystem operations. No remote transfer, ACL/xattr or ownership validation, concurrent writer, crash durability, timing benchmark or full application recovery was tested. Do not run deliberate write probes on real backups.

Definitions: hard link and backup manifest.

What rsync --append-verify leaves unchecked

All 30 commands returned success; 14 destinations still differed from the source. These were deliberately constructed cases, not a failure-rate sample. With --append-verify, a shorter file with a damaged prefix was repaired, but equal-length and longer destinations were left different. Adding --checksum or --ignore-times to that append mode did not change those outcomes.

Each case used a fresh 16,384-byte source and an independent destination. Short destinations contained 8,192 bytes, with either a correct prefix or one flipped bit. Equal-length destinations had that same one-bit difference; we tested both matching and different modification times. The longer destination held the complete correct source followed by 8,192 unwanted bytes.

Local rsync 3.2.7, protocol 31, with --no-whole-file. Each cell compares the entire final file with the source. Every exit status was 0.
Destination before copying--append--append-verify--append-verify --checksum--checksum only
Short, correct prefixMatchesMatchesMatchesMatches
Short, one wrong bitDiffersMatchesMatchesMatches
Equal length, wrong bit, same mtimeDiffersDiffersDiffersMatches
Equal length, wrong bit, different mtimeDiffersDiffersDiffersMatches
Longer, correct prefix plus unwanted tailDiffersDiffersDiffersMatches

Two controls separate the selection rules

The ordinary quick check skipped the equal-size, equal-mtime corruption but copied the equal-size file whose mtime differed. Adding --ignore-times to append verification bypassed the ordinary quick check, yet still skipped both equal-length files and the longer file. Their content remained different. This isolates the append length rule from the quick check.

Same five fixtures, two additional policies. All commands returned 0; cells report complete final-byte equality.
Destination before copyingOrdinary quick check--append-verify --ignore-times
Short, correct prefixMatchesMatches
Short, one wrong bitMatchesMatches
Equal length, wrong bit, same mtimeDiffersDiffers
Equal length, wrong bit, different mtimeMatchesDiffers
Longer, correct prefix plus unwanted tailMatchesDiffers

Checking a transferred file does not select every file for transfer

The manual limits append mode to shared, growing files and says it skips destinations that are not shorter. Append verification includes the existing prefix when a transfer occurs; it does not remove that selection rule. [version-matched manual] In the pinned generator, the size-based skip follows the ordinary quick check. Thus even a checksum-detected content difference can still be skipped. This is a source-code explanation of documented behavior, not a new rsync defect. [generator.c]

The shorter damaged-prefix controls produced a verification warning followed by a successful retry under all three verifying append policies. Full-byte comparison confirmed repair. Plain append kept the wrong first bit while extending the file to the correct length. The receiver code includes the existing prefix in its append-verification checksum and changes mode for the retry. [receiver.c]

Delta matching solves a different problem

Tridgell and Mackerras's original algorithm report describes matching blocks at arbitrary source offsets against checksums of receiver blocks, then sending references and unmatched bytes. That saves link traffic when a file is transferred; it does not promise that a directory-level selection policy will choose every differing file. The report's kernel-archive and Samba-source examples evaluate transfer work, not backup recoverability. Its historical MD4 design is not a recommendation for modern authentication. [algorithm report]

Choose a copy policy before choosing a verification label

For reconciliation of arbitrary existing files, do not infer whole-tree equality from the word verify or exit status 0. The checksum-only control repaired all five fixtures, including truncating the unwanted tail. That observation does not turn it into an application restore test. Preserve the intended source snapshot, evaluate selection and exclusion rules, then verify the bytes and metadata that the recovery task requires.

Append modes update in place. The older hard-linked backup experiment therefore remains relevant when choosing a destination. The present fixtures deliberately had no hard links; we did not repeat that mutation experiment.

Standalone reproduction script and all 30 observations include commands, stdout/stderr, sizes, mtimes, SHA-256 digests and runtime identity. Run python3 rsync-append-selection.py --output observation.json. The script accepts no production paths, uses disposable files, refuses an existing output, and compares full payloads against independently specified expected bytes.

Recorded 2026-10-18T10:40:19.318498+00:00; source was quiescent throughout. The recorded filesystem was tmpfs. No network, interrupted transfer, concurrent writer, application recovery, cold-media read or power cut was tested. This installed version is an observation identifier, not a patch recommendation; upstream-tag identity with the distribution binary was not established.

SFTP: completion, file identity and synchronization are separate

SFTP (SSH File Transfer Protocol) is a remote-file protocol normally carried over SSH, not FTP protected with TLS. OpenSSH scp has used SFTP by default since release 9.0; the command name alone does not identify the protocol. [Protocol scope] [FTP with TLS] [OpenSSH 9.0]

A successful resumed transfer can retain the wrong bytes. In controlled OpenSSH tests, a one-byte error in a 2,048-byte prefix survived both reget and reput: exit status was 0 and final length was 8,192 bytes. Adding -f did not repair the prefix. Ordinary overwrite controls restored exact source bytes. The manual explicitly assumes that a partial copy already matches the source. [Matching-prefix precondition]

The same 18 cases were run with each combination of Ubuntu OpenSSH 9.6p1 (package 1:9.6p1-3ubuntu13.20) and source-built upstream 10.6p2 clients and servers. A fresh repeat reproduced all 72 outputs. These are designed counterexamples, not independent population samples or failure rates.

Four client/server pairings, 18 cases each. Denied WRITE used server policy -P write; FSETSTAT remained allowed. Both clients returned 1 in that control.
Client / server buildInjected remote fsync failures with exit 0Of these, exact-byte overwritesBytes after denied WRITE
ubuntu-9.6p1 / ubuntu-9.6p1210
ubuntu-9.6p1 / upstream-10.6p2210
upstream-10.6p2 / ubuntu-9.6p1218,192
upstream-10.6p2 / upstream-10.6p2218,192

Correct bytes did not establish successful synchronization. Eight deliberately injected remote fsync errors coexisted with batch exit 0; four followed exact-byte overwrites. The server returned a failure response and the client printed remote fsync: Failure. The inspected upload implementation discards the synchronization function's return value. [Pinned client implementation] An unavailable extension is different: with the extension suppressed, no sync request was attempted. The protocol operation synchronizes an open handle; it does not compare the file with an independently expected source. [Extension contract]

Expected length did not establish successful transfer either. After the single data WRITE was rejected, the 10.6p2 client requested a size update: the retained 2,048-byte prefix gained 6,144 zero-valued bytes. The 9.6p1 client instead left an empty file. This result followed the client version in both server pairings. Error cleanup uses the client's high-water accounting; the server applies the size request with ftruncate. [Upload cleanup] [Size handling] The test denied WRITE requests, not FSETSTAT. It was not a read-only-server test, an operating-system permission bypass or a claim about every failed upload.

Recovery acceptance: retain the command outcome, complete comparison against a trusted source generation, required synchronization outcome and restore result separately. A digest computed only from the destination can faithfully describe the wrong bytes. Preserve the original and verify a separate recovery destination before replacing valuable material. The rsync controls above exercise different selection and prefix-verification rules; the two protocols do not share a generic "resume with verification" contract.

In these resume controls, the bad prefix existed before any new payload arrived. Checking only the newly transferred suffix would miss that fault. The end-to-end discussion below explains why the final comparison must include the reconstructed file, not just this session's new bytes. This is Hesela's application of the design argument to these controls.

Download the standalone code, raw bytes and native logs, generated four-pair summary, file hashes and source revision and source locators. The package includes the original 18-case capture and the version-scope supplement. Its standard-library verifier checks saved evidence without installing OpenSSH.

Constructed, quiescent local files on one Linux host, using real SFTP binaries with direct pipes and no SSH transport. Sync EIO was injected in the disposable server process. No power cut, media fault, network interruption, full application restore or independent peer replication was tested. Two selected builds do not establish behavior in every release or implementation.

A verified backup may not reach the chosen recovery target

Point-in-time recovery (PITR) needs both a suitable base backup and the required log history. In PostgreSQL 18, a target cannot precede the end of that base backup. Completing archive recovery creates a new timeline; ordinary WAL archiving does not. [3, sections 25.3.5-25.3.6]

A recovery target is the replay stopping condition. It is distinct from the recovery point objective, which states a data-loss requirement. PostgreSQL allows one target type, with separate settings for timeline, applicable inclusive boundaries and the action at the target. If recovery runs out of available WAL before reaching an explicit target, it fails with a fatal error. [11]

Inspect the stopping point before finishing recovery

In PostgreSQL 18, for a configured target, recovery_target_action chooses whether to finish recovery (promote), stop the server (shutdown), or pause for inspection (pause, the default). At a target pause, pg_wal_replay_resume() ends recovery; moving to a later target requires stopping the server, changing the target and restarting. With hot_standby disabled, pause acts as shutdown; during an ongoing promotion it acts as promote. The shutdown action retains recovery.signal, so an unchanged restart stops again. These settings apply only with a configured target. [11]

For inspection, pg_is_wal_replay_paused() reports a pause request. pg_get_wal_replay_pause_state() distinguishes not paused, pause requested and paused: only the last means replay is actually paused. [recovery controls] Hesela's proposed acceptance record therefore separates the configured target, selected action, actual replay state and application checks.

The manifest records the WAL needed to make the base backup usable, not every later stopping point. [6] pg_verifybackup does not parse unrelated extra WAL. [1] Hesela's inference: a successful verifier run cannot establish a later target's reachability.

WAL archiving must preserve the necessary history. For a repeatable test, record the selected timeline and stopping condition, then retain the replay outcome and application acceptance results. This is a proposed evidence record, not an executed recovery experiment.

Archive activity is not proof of recovery coverage

archive_timeout triggers segment switching after the configured interval when there has been database activity; it does not complete the archive transfer. Early-closed segments keep their full file length. [12] Hesela's inference: this setting alone cannot guarantee an end-to-end RPO.

The interval is measured since the previous segment switch, not separately from each transaction commit. [12] This timeout is not an archive-capacity limit: workload-driven completion and manual pg_switch_wal calls can close segments sooner. [3, section 25.3.1] Size retention from the actual segment inventory and configured segment size, with separate accounting for compression and storage overhead.

A standby restart boundary is not a shared archive retention policy. PostgreSQL documents pg_archivecleanup with %r in archive_cleanup_command for one standby's transient staging area, not a long-term archive or an archive shared by recovering standbys. [150] Keep the history required by every retained backup and recovery target, not only the latest standby restart point.

A cleanup cutoff is not timeline-number order

The cleanup source compares the filename after its eight-character timeline prefix. This deliberately avoids discarding a parent timeline's later segments; the cutoff itself remains. [151] [152]

We ran PostgreSQL 16.15 against 23 synthetic files in 10 cases, always using -n. All file hashes stayed unchanged. These files are not valid WAL. With cutoff 000000020000000000000010, the tool listed 00000003000000000000000F but retained 000000010000000000000011: segment position, not the larger timeline number, determines selection. [153]

Plain, partial and backup-history cutoff arguments produced the same boundary. Compressed candidates required -x .gz; output kept their original filenames. Timeline-history files and backup-history candidates remained in this 16.15 fixture. [153]

Version-specific options matter: 16.15 rejected --dry-run and -b. The reviewed 18.0 source supports both, including optional backup-history cleanup; we did not execute 18.0. [152] [153] Accepting a backup-history filename as the cutoff does not mean that this version can clean such files.

This is a filename-selection probe, not a restore test or a recommendation to delete these files from a real archive. Reproduce it with the probe, inspect the native results and read the method and limits.

In pg_stat_archiver, last_archived_wal identifies the most recent successful operation, not a verified contiguous recovery boundary. Archiving order is not guaranteed, including around promotion or crash recovery. [13] Some failures that restart the archiver, such as a shell exit status greater than 125, are absent from these statistics. [3, section 25.3.1]

Our proposed evidence record therefore pairs archive statistics and server logs with the required segment inventory, selected timeline, target replay result and application checks. A recent success timestamp or zero failed attempts is insufficient alone. No restore or failure-injection experiment was performed for this review.

Retention protects a copy; it does not test it

S3 Object Lock protects individual versions; new versions and delete markers can still be created. [9] Hesela's inference is straightforward: retaining the wrong version, or an incomplete dependency set, does not make the required recovery possible. Keep version identity and dependency evidence alongside retention settings.

Version history, retention and legal hold are separate controls

In S3 general-purpose buckets, enabled versioning keeps revisions under one key, but does not itself prohibit authorized permanent deletion of a version. [21] The following comparison describes documented service behavior, not a live deletion test or a compliance certification.

Check the protected version and the actor's permissions, not only the bucket label.
ControlProtection boundaryRecovery evidence still needed
VersioningPrevious revisions remain after replacement; a simple delete adds a marker. [21]The intended version ID, not just the key.
Governance retentionPrivileged callers can bypass it only with an explicit bypass request. [22]Who can bypass protection.
Compliance retentionEven the account root cannot delete the protected version or shorten retention; AWS notes account deletion as an exception. [9]The version's effective protection state.
Legal holdNo automatic expiry; authorized removal does not cancel an independent retention period. [9]Hold status and hold-removal rights.

Enabling Object Lock is separate from applying protection to a version. [24] The retention API also supports event holds and durations for variable retention, so a date captured at upload is not always the final retention boundary. [25]

Check the version, not just the bucket default

A default retention rule assigns protection to new S3 versions that omit explicit retention settings. It is not inherently a minimum: an otherwise authorized upload can supply its own mode and period instead. This does not shorten an already protected version. [Configuration]

Documented S3 general-purpose bucket behavior, not a live AWS experiment.
Version or operationWhich settings apply?
Version already present when the default changesNo retroactive assignment or update. Protect existing versions separately. [Existing data]
New upload without explicit retentionThe configured bucket default, if present, supplies retention. [Bucket API]
New upload with explicit mode and periodAccepted version settings take precedence over the default. [Configuration]
Replica with source retention controlsSource controls override the destination default; without source controls, the configured destination default applies if present. [Replication]

Bucket-policy limits are a separate control. For variable retention, event-hold conditions evaluate supplied request fields, not automatically inherited defaults. Control who can change bucket defaults using the s3:PutBucketObjectLockConfiguration permission as well. [Policy limits] A default may itself start variable retention; do not assume every expiry date was fixed at upload. [Configuration]

Hesela's acceptance check: record bucket, key and version ID, then inspect that version's retention and legal-hold metadata with appropriate permissions. [Retention API] [Permissions and hold status] Keep the observation time and compare the result with the required recovery window. A bucket-configuration screenshot alone does not establish coverage of older backups or replicas. This is a documentation-based check, not a tested IAM policy or restore.

Record when protection metadata was observed, not only when the backup was written. For an active event hold, S3 Inventory reports a computed retain-until date as of report generation; a direct GetObjectRetention request gives the current value. A scheduled inventory is therefore a dated observation, not a live certificate of the version's remaining protection. [Inventory and variable retention]

A missing key view can hide a retained version

When the current S3 version is a delete marker, a GET without versionId returns 404 and ListObjectsV2 omits that object. ListObjectVersions exposes its version history. [23] A 404 in this case is not evidence that every recovery copy disappeared.

Lifecycle transitions remain possible while Object Lock prevents expiration from deleting a protected version. The lock does not protect encryption keys: losing key access or deleting a required KMS key can leave retained data unreadable. [22]

Hesela's proposed non-destructive check: inventory bucket, key and intended version; inspect its protection metadata; then retrieve that version into an isolated recovery destination using the intended recovery identity. S3's GET contract requires appropriate version-read permissions and, for relevant encrypted objects, key permissions; archived objects can require restoration before retrieval. [26] Continue with dependency and application checks. Do not infer a successful restore from retention metadata alone.

Definitions: object versioning, object lock, legal hold and WORM storage.

State what the backup is isolated from

CISA recommends offline encrypted copies and regular recovery checks because ransomware can target accessible backups. It also cautions against reinfection during restoration. [Backup protection and recovery] A disconnected copy and an online retention rule therefore answer different questions: can the production system reach this copy, and which changes does the storage service refuse?

Hesela's assessment checklist: identify the protected copy, its connection periods, the machine allowed to write it, control over reconnection, and the keys and software needed to recover. Include physical custody. Do not infer universal platform-compromise resistance or a fixed restore speed from the label air-gapped. Measure the actual retrieval and restoration workflow.

Isolation does not establish that a saved state is safe. NIST's recovery guidance requires confidence in data accuracy, completeness and absence of malware. [Sections 1.1-1.2] Keep these acceptance checks separate from the isolation record.

Protect access to deleted history too

S4's self-securing storage design highlights a second boundary: permission to recover old versions can expose sensitive information deleted from the current view. Its administrative interface also controls dangerous operations on retained history. [10, sections 3.4-3.5]

Hesela's operational implication: inventory who can read history separately from who can alter retention. A successful deletion from the current view is not evidence of erasure from recovery copies.

A retained version can already be compromised

Strunk and colleagues' OSDI 2000 S4 prototype separated storage protection from a potentially compromised host. Its version history and audit records covered a bounded detection window; the newest backup could already include harmful changes. [10, sections 2.2 and 3.3]

This is historical design evidence, not a test of modern Object Lock. Hesela's inference: a restore acceptance record should explain why its recovery point is trusted, not merely confirm that retained bytes match their hashes.

Retention duration is not history coverage

S4 identifies a capacity conflict: reclaiming protected history loses evidence, stopping version creation loses subsequent history, and rejecting writes sacrifices availability. Its proposed response was to throttle suspected abuse, not a guarantee against exhaustion. [10, section 3.3]

Periodic snapshots can miss short-lived files and intermediate changes. S4's capacity estimates used earlier workload studies and a small compression experiment; they are not modern backup sizing measurements. [10, sections 5.2 and 6] Hesela's inference: record capture granularity and full-capacity behavior alongside retention.

Even per-modification device versioning has an observation boundary. S4's discussion explains that a file created and deleted while still in a client write cache may never reach the storage device; client read caches also hide read dependencies from its audit trail. This does not show loss of data already accepted by the device. [10, section 6: client-side cache effects] Hesela's inference: specify where capture occurs and which acknowledged events it covers. Lengthening retention cannot recover an event that was never captured.

TIFF: intact pixels can become unreachable images

A successful image read does not establish the intended image inventory. Hesela fixed three 4-by-4, 8-bit grayscale images in order A-B-C before encoding a 558-byte classic-TIFF file. On the recorded LibTIFF 4.5.1 build, changing one pointer byte made traversal end after A without diagnostics. Every original pixel byte remained present; B still decoded correctly at its independently known directory offset.

TIFF links its image file directories (IFDs); zero terminates the main chain. Baseline reader conformance does not require consuming later IFDs. [TIFF 6.0, pp. 13-16, 26] A nonzero invalid pointer produced an error in our control. The TIFFReadDirectory return value alone cannot distinguish error from end; preserve diagnostics and terminal state. [LibTIFF API]

Seven controlled conditions, each tested in both byte orders. A, B and C identify independently expected pixels; B* has one changed pixel bit. These 14 synthetic files are not field-frequency samples.
ConditionDecoded orderClean endExpected countUnordered pixelsOrdered pixels
Original A-B-CA, B, CPassPassPassPass
Terminate after AAPassFailFailFail
Skip BA, CPassFailFailFail
Reorder to A-C-BA, C, BPassPassPassFail
Point B at C pixelsA, C, CPassPassFailFail
Change one B pixel bitA, B*, CPassPassFailFail
Invalid next offsetAFailFailFailFail

Reordering to A-C-B preserves both count and the unordered pixel hashes. Pointing B at C's strip returns A-C-C while all original strips survive. The acceptance requirement must bind expected identities to content and required relationships, not merely count whatever the recovered chain returns. For migration, retain dimensions, sample interpretation and relevant metadata alongside that independently established expectation.

These fixtures are recovery controls, not conformance examples: the original file already has shared resolution-value offsets, and the alias control additionally reuses a pixel-strip pointer. TIFF 6.0 warns against duplicate pointers and does not require readers or editors to detect them. Successful decoding alone therefore does not establish format conformance. [TIFF 6.0, pp. 26-27]

Physical directory order is not universally logical order. OME-TIFF TiffData can map IFDs to different logical planes; pyramid levels intentionally lie outside the primary chain and its TiffData mapping. Use the actual format profile. [OME-TIFF 6.2.2] Main-chain traversal also does not enumerate every SubIFD relationship. [LibTIFF multipage]

Pixel identity is only one part of scientific reuse. Linkert and colleagues' 2010 review recommends keeping image metadata associated with the pixels and preserving it through analysis. Their discussion distinguishes readable binary arrays from interpretable acquisition metadata; it is not a TIFF recovery benchmark. For an archive migration, our practical inference is to test required channel, time and spatial metadata as well as pixel values. [Linkert et al., 2010, microscopy formats and Box 1]

Limits: one Linux/library build, tiny uncompressed classic TIFFs; no BigTIFF, codec, OME, SubIFD or hardware-fault experiment. Known-offset salvage is not automatic orphan discovery. A trusted whole-file digest detects every fixture mutation; hashing after the change cannot prove the intended earlier state. This is not a hash collision or a new library defect.

TIFF image file directory · Machine-readable comparison · Full native observations · Reproduction package · Replay instructions and limits. The package contains original fixtures, both captures, executable tests, mutation maps, library identity and six primary-source receipts.

A full scan can miss a broken lookup

Reading more bytes does not necessarily test the access path an application uses. This synthesis connects three existing Hesela studies, using six retained logs. It is a reanalysis, not a new native experiment or a production failure-rate estimate.

In the LMDB 0.9.33 copied-database controls, a cursor returned all 257 expected keys with correct values, but default-comparator lookup found none. Installing the original descending comparator found all of them. The failing control deliberately violates LMDB's documented comparator contract; it does not reveal a new engine defect. LMDB method and native replay.

With stale BGZF/Tabix data-index pairs, compressed checks, exact full decompression and a broad indexed query passed; a narrow query succeeded with zero instead of two records. Matching or rebuilding the index corrected these fixtures. Tabix controls and native replay. HDF5 controls preserve the transferred chunk bytes, not the entire destination file: filtered reads can succeed while placement, generation or interpretation is wrong. HDF5 controls and native replay.

Six acceptance boundaries derived from retained observations. LMDB 0.9.33; HTSlib 1.22.1/1.24; HDF5 1.14.2/1.14.6. Each row maps to exact observations and controls in the downloadable evidence map.
BoundaryCheck that passedWhat still failedAdditional acceptance obligation
HDF5: Logical placementUnchanged transferred chunk bytes and successful filtered readDecoded values differ from intended coordinate/value mappingBind chunk coordinates to the intended dataset.
HDF5: GenerationUnchanged transferred chunk bytes and successful filtered readDecoded values differ from intended coordinate/value mappingBind the payload to an independently expected generation.
HDF5: Datatype interpretationUnchanged transferred chunk bytes and successful filtered readDecoded values differ from intended coordinate/value mappingPreserve the dtype/byte order; check decoded values.
HDF5: Filter interpretationUnchanged transferred chunk bytes and successful filtered readDecoded values differ from intended coordinate/value mappingBind ordered filter parameters and positional masks.
LMDB: Runtime ordering and lookup pathFull cursor scan returns every expected key with correct values; file unchangedDefault-comparator point lookup finds none of the existing keysInstall the original comparator before access; test known present and absent keys.
BGZF/Tabix: Data/index pairing and query coverageData/index compression tests, exact full decompression and broad indexed queryNarrow indexed query returns success but omits expected matching recordsBind index and data generation; compare narrow queries with independently expected results.

Put each check at the layer that can interpret it

Saltzer, Reed and Clark's 1984 file-transfer example compares a checksum recomputed after reading back the destination file with the source checksum. Packet checks do not cover every intervening component; lower-layer checks can still reduce retry cost. That argument concerns faithful file transfer, not whether the selected backup represents the intended application state. End-to-End Arguments, sections 2.1-2.3.

A storage-specific example appears in Bairavasundaram et al.'s FAST 2008 study: its RAID scrub verifies checksums and parity, but filesystem reads additionally validate block identity. That scrub lacks the filesystem context needed for the identity check. This is the studied stack's division of responsibility, not a claim about every scrub implementation. Storage-stack study, sections 2.2-2.3.

Hesela's engineering inference: establish the intended dataset and generation independently of the candidate copy. Bind associated artifacts and reader configuration; then compare actual application queries with separately retained expected identities and values. A manifest made after assembling the wrong data-index pair faithfully records the wrong pair.

Include known present and absent keys, narrow selection boundaries or coordinate reads as appropriate. A second command is not automatically an independent oracle: Tabix's sequential -T path still uses index parsing metadata. Sampled checks establish only their tested scope. Preserve originals and work on a disposable restoration.

Record the selection contract as well as its output. Li's original Tabix paper separates candidate-bin selection from testing records for overlap; these are distinct steps. Tabix (2011), section 2.2. The HTSlib 1.24 manual makes region strings one-based and inclusive, while BED uses zero-based, half-open intervals. Thus chr1:900001-900030 denotes the same span as BED coordinates [900000, 900030). The -0 indexing option describes stored data, not a switch for command-line region syntax. Versioned query contract.

Acceptance implication: retain the actual command, input path, query bounds, target-file contents and format, not only a successful status or matching row count. Identical results need not establish identical selection at a boundary. This is source-based guidance; the retained Tabix experiment changed index generation, not coordinate convention. Its synthesis now checks recorded command arguments, but does not authenticate execution or independently recover the target-file contents.

Evidence map with exact row pointers / Reproduction instructions / Primary-source contracts. The package checks derivation from retained logs; it does not rerun the native libraries. These families have no common incident denominator and cannot supply a pooled failure rate.

A useful restore test has acceptance criteria

NIST's sampled restoration checks selected functions; broader recovery returns a system to a known state within defined objectives. [8, CP-9(2), CP-10] For PostgreSQL, inspect the recovered database's contents against the desired state before opening access. [3, section 25.3.5]

Hesela's recommended test record, not a vendor-mandated checklist:

  • Identify the backup, object versions, predecessor set and intended recovery point.
  • State why that recovery point is acceptable, including any known compromise window.
  • Record tool versions, options, exclusions and integrity-check results.
  • Use an isolated recovery destination; preserve the source backups.
  • Record restored scope, data checks, application checks and observed failures.
  • Measure elapsed time with explicit start and end events; distinguish retrieval, replay and acceptance time.
  • State what was sampled, what was not tested and how the test environment differs.

The SQLite sections report source-view and native API completion experiments, plus relational and application validation. The rsync, Git, BagIt and OCFL sections report controlled software behavior. The access-path section synthesizes retained HDF5, LMDB and Tabix observations. Other sections review documentation; no full application recovery or recovery duration was measured, and no probability of recovery is estimated.

Definitions: backup verification, backup manifest, incremental backup, restore test and storage immutability.

Related: QCOW2 backing chains and verification, compressed archive dependencies and completeness, Parquet checksum and scan coverage, snapshot, backup and recovery boundaries, checksum and identity boundaries, WAL and checkpoint boundaries and what disk scrubbing establishes.

NDMP: identify the stream before testing the restore

A NAS backup can use a standard control protocol without producing a portable backup format. NDMP separates backup control from data transfer. The Data Management Application (DMA) coordinates the operation; it need not carry the payload through its own host. [NDMP architecture]

Locate the data path. In the documented local-tape configuration, control crosses the network but the data connection stays within the storage system. With data and tape services on different systems, the three-way configuration carries that stream over the network. This is placement, not a promise of three copies or a tested recovery. [Topology]

Identify the format and reader. The Oracle appliance guide explicitly separates NDMP from the backup stream format and limits restoration to compatible appliance software. Record the source implementation, release, backup type and supported destination before relying on a surviving tape. Protocol negotiation alone cannot establish that the destination can decode the image. [Format compatibility]

Preserve the catalog, then verify the payload. The archived NDMPv4 draft describes file history carrying names, status and file-location information to the DMA for indexing and selective recovery. Those functions do not by themselves demonstrate payload integrity; that is an inference from the metadata's purpose, not an NDMP checksum result. ONTAP documents that file history can be disabled for whole-image recovery and that SMTape does not support it. Its absence therefore does not universally mean the image cannot be restored. [File history] [Implementation scope]

For a recovery test, retain the intended image and dependency inventory, exercise the supported reader on the intended destination, and compare required contents and metadata. A browsable backup catalog helps select that test; it does not replace it. This section is a documentation synthesis, not a measured NDMP transfer or cross-platform restore.

Remote proofs still need a recovery target

Cryptographic storage auditing asks a different question from exercising the restore procedure. Our comparison of ownership, possession and retrievability proofs separates who proves what, includes a reproducible sampling calculation, and explains the remaining key, version and application-recovery checks.

Recovery also includes access policy. Our Linux ACL restore controls produced identical payload bytes and mode 0660 with different ACLs and owning-group permissions. Verify complete access and default ACLs, identity mapping and final permissions after post-processing, not only file hashes.

Recovery must preserve required names too. Our filename identity experiment shows two content checks passing after a naming transformation collapses two equal-content entries to one.

Primary sources and scope

  1. PostgreSQL 18: pg_verifybackup, checks and exclusions
  2. PostgreSQL 18: pg_combinebackup, dependency chains and hard links
  3. PostgreSQL 18: Continuous Archiving and PITR, backup chains, recovery and timelines
  4. PostgreSQL 18: Backup Manifest Format
  5. PostgreSQL 18: Backup Manifest File Object
  6. PostgreSQL 18: Backup Manifest WAL Range Object
  7. PostgreSQL 18: pg_basebackup, manifest checksums and trust
  8. NIST SP 800-53 Rev. 5: CP-9(1), CP-9(2) and CP-10
  9. Amazon S3 User Guide: Locking objects with Object Lock
  10. Strunk et al.: Self-Securing Storage: Protecting Data in Compromised Systems, OSDI 2000, sections 2.2, 3.3, 5.2 and 6
  11. PostgreSQL 18: Recovery Target, stopping conditions and timelines
  12. PostgreSQL 18: archive_timeout and WAL segment switching
  13. PostgreSQL 18: pg_stat_archiver and archive ordering limits
  14. SNIA Dictionary: full backup
  15. Microsoft SQL Server: Differential backups and differential bases
  16. Microsoft SQL Server: Full database backups and restore scope
  17. Veeam Backup & Replication: How Synthetic Full Backup Works (Hyper-V)
  18. SNIA Dictionary: differential incremental backup
  19. restic repository format: snapshots, trees and data
  20. Linux man-pages: FICLONE, shared storage and copy-on-write isolation
  21. Amazon S3: How S3 Versioning works
  22. Amazon S3: Object Lock considerations
  23. Amazon S3: Working with delete markers
  24. Amazon S3: Configuring S3 Object Lock
  25. Amazon S3 API: PutObjectRetention
  26. Amazon S3 API: GetObject
  27. SQLite: Isolation, WAL snapshots and transaction lifetime
  28. SQLite version-3.45.1: src/backup.c, source read-transaction ownership
  29. SQLite Online Backup API: step completion versus finish cleanup
  30. Python sqlite3.Connection.backup: page copying and progress callback
  31. SQLite PRAGMA integrity_check: check scope
  32. Gaffney et al.: SQLite: Past, Present, and Future, PVLDB 15(12), 3535-3547 (2022), sections 2.1.3, 2.2 and 4
  33. SQLite version-3.45.1: backup.c, stored step status and finish return
  34. SQLite: Using the Online Backup API, incremental retry example
  35. Rsync manual: selection checks, in-place writes, linked destinations and existing files
  36. Rsync 3.2.7 generator.c: quick_check_ok, unchanged_attrs, try_dests_reg and recv_generator
  37. SQLite PRAGMA foreign_key_check: returned violation records
  38. SQLite PRAGMA foreign_keys: transaction boundary for enforcement changes
  39. SQLite Foreign Key Support: nullable references and connection enforcement
  40. SQLite: Rowid tables and persistence of unaliased rowids
  41. SQLite: VACUUM and VACUUM INTO
  42. SQLite: AUTOINCREMENT, committed history and sqlite_sequence
  43. SQLite version-3.45.1 insert.c: xferOptimization rowid selection, lines 2933-2947
  44. CPython v3.12.3 sqlite3/dump.py: declared-column export, lines 53-62
  45. SQLite CREATE TABLE: rowids, exact INTEGER type and column-level DESC exception
  46. Rsync 3.2.7 manual: append and append-verify selection rules
  47. Rsync 3.2.7 receiver.c: prefix checksumming and retry handling
  48. Tridgell and Mackerras: The rsync algorithm, ANU report TR-CS-96-05 (1996); project HTML edition, algorithm and results sections.
  49. Git v2.43.0: shared clones, local repacking and dissociation
  50. Git v2.43.0: full and connectivity-only object checks
  51. Git v2.43.0: pack-objects --local
  52. Git v2.43.0: bundle scope and prerequisites
  53. Git v2.43.0: bundle verify command implementation
  54. Git v2.43.0: prerequisite checks and index-pack during unbundling
  55. Verma, Voruganti, Routray and Jain: SWEEPER, FAST 2008, recovery-point identification model
  56. CISA et al.: #StopRansomware Guide, offline backups and recovery
  57. NIST SP 1800-11B: Data Integrity, recovery requirements in sections 1.1-1.2
  58. SQLite 3.54.1: release source identity and sqlite3.c SHA3-256
  59. SQLite: sqlite3_get_autocommit, connection autocommit state
  60. SQLite: sqlite3_txn_state, per-schema transaction state
  61. SQLite: PRAGMA journal_size_limit, retained journal and WAL size
  62. SQLite: sqlite3_wal_checkpoint_v2, return codes and cumulative counters
  63. Rsync v3.4.1 manual, pinned commit 3305a7a: hard links, link-dest, files-from and in-place boundaries
  64. Elizabeth D. Zwicky: Further Torture: More Testing of Backup and Archive Programs, LISA 2003, pp. 7-14
  65. Linux man-pages: stat(2), file identity and concurrent metadata observations
  66. Git v2.43.0: partial-clone dependency contract
  67. Git v2.43.0: promisor-aware object checks
  68. Git v2.43.0: missing-object enumeration
  69. Git v2.43.0: shallow history boundaries
  70. Hutchinson et al.: Logical vs. Physical File System Backup, OSDI 1999, sections 1, 3-5
  71. Hesela: Avro reader-policy controls and interpretation boundaries
  72. Scherzinger, Klettke and Storl (2013): Managing Schema Evolution in NoSQL Data Stores, section 6
  73. RFC 8493: BagIt 1.0, sections 2.1.3, 2.2.1, 2.2.2, 3 and 5.4
  74. Library of Congress: pinned bagit-python 1.9.0 validation implementation
  75. Library of Congress: pinned bagit-python validation modes and CC0 notice
  76. PostgreSQL 16: sequence functions, is_called, rollback and crash scope
  77. PostgreSQL 16: CREATE SEQUENCE, reserved values and per-session caches
  78. PostgreSQL 16: ALTER SEQUENCE, transactional RESTART
  79. PostgreSQL 16: transaction isolation and the sequence exception
  80. PostgreSQL 16: logical replication restrictions, sequence state
  81. PostgreSQL 16: pg_dump, data-only scope includes sequence values
  82. PostgreSQL 16.15 source: sequence cache invalidation and transactional replacement
  83. Dan R. K. Ports and Kevin Grittner. Serializable Snapshot Isolation in PostgreSQL. PVLDB 5(12), 1850-1861, 2012; sections 3, 4 and 8.
  84. OCFL 1.1 specification: object-at-rest consistency and external digests
  85. OCFL 1.1 implementation notes: version immutability and update recovery
  86. ocfl-py 2.1.0: pinned file-versus-object validation dispatch
  87. Hankinson et al. (2019): OCFL metadata-read accounting, section 2.1 and Tables 1-2
  88. Python 3.12 CSV documentation: null-aware reader limitation
  89. Python 3.13 CSV documentation: null-aware reading
  90. CPython 3.12.3 pinned CSV parser: parse_save_field
  91. CPython 3.13.0 pinned CSV parser: parse_save_field
  92. PostgreSQL 17 COPY: quoting-sensitive null convention
  93. W3C CSV on the Web primer: null markers and required values
  94. Mitlohner et al.: Characteristics of Open Data CSV Files, OBD 2016, pp. 72-79, sections IV and IV-B; DOI 10.1109/OBD.2016.18
  95. PostgreSQL 18: Recovery Control Functions, requested and actual pause states
  96. Hesela: LMDB comparator contract, complete scans and point lookups
  97. Hesela: BGZF/Tabix data-index pairing and query coverage
  98. Hesela: raw HDF5 chunks, identity and interpretation
  99. Saltzer, Reed and Clark (1984): End-to-End Arguments in System Design, sections 2.1-2.3
  100. Bairavasundaram et al. (FAST 2008): An Analysis of Data Corruption in the Storage Stack, sections 2.2-2.3
  101. Li (2011): Tabix: fast retrieval of sequence features from generic TAB-delimited files, section 2.2
  102. HTSlib 1.24: Tabix region strings, indexing conventions and target-file formats
  103. AWS Storage Blog: Applying Amazon S3 Object Lock at scale for petabytes of existing data
  104. Amazon S3 API: PutObjectLockConfiguration
  105. Amazon S3: What does Amazon S3 replicate? Object Lock retention precedence
  106. Amazon S3 API: GetObjectRetention
  107. Git LFS v3.4.1: pointer format
  108. Git LFS v3.4.1: revision and path scope of fsck
  109. Git LFS v3.4.1: object hash checking
  110. Git LFS v3.4.1: size checking during materialization
  111. Git LFS v3.4.1: per-file checkout outcomes
  112. Git LFS v3.4.1: ordinary checkout loop
  113. Git LFS v3.4.1: fetch-all reachability and path scope
  114. Git v2.43.0: checkout/check-in conversion and filter requirements
  115. Git v2.43.0: path-aware hashing and --no-filters
  116. Git v2.43.0: replacement lookup and fsck exceptions
  117. Git v2.43.0: archive attributes and commit labels
  118. Git v2.43.0: tag signature verification
  119. Chirigati, Shasha and Freire: ReproZip, TaPP 2013, sections 3-4
  120. Rhea, Cox and Pesterev: Fast, Inexpensive Content-Addressed Storage in Foundation, ATC 2008, sections 1-2
  121. SQLite: serialization connection and schema scope
  122. SQLite: deserialization WAL-header restriction
  123. SQLite 3.45.1: ordinary serialization pager path
  124. SQLite 3.54.1: ordinary serialization pager path
  125. Pillai et al.: All File Systems Are Not Created Equal, OSDI 2014, sections 3-4
  126. TIFF Revision 6.0 (1992), sections 2 and 7, pp. 13-16 and 26: IFD links and reader scope
  127. LibTIFF: TIFFReadDirectory, return values and diagnostics
  128. OME-TIFF 6.2.2: TiffData mapping and sub-resolution storage
  129. LibTIFF: main-IFD chains and SubIFD relationships
  130. Linkert et al. (2010), Metadata matters: access to image data in the real world; microscopy file formats and Box 1
  131. Apache Arrow 21.0: IPC streaming and file format, dictionary messages
  132. PyArrow 21.0: table-scoped dictionary unification and delta options
  133. Apache Arrow 21.0.0: WriteTable and WriteDictionaries implementation
  134. OpenSSH 10.6p2: SFTP resume precondition and synchronization options
  135. OpenSSH 10.6p2: upload status, high-water accounting and fsync return handling
  136. OpenSSH 10.6p2: request denial, size updates and synchronization status
  137. OpenSSH 10.6p2: fsync@openssh.com file-handle extension
  138. SSH File Transfer Protocol, version 3: expired Internet-Draft, sections 1-4
  139. RFC 4217: Securing FTP with TLS
  140. OpenSSH 9.0 release notes: scp switches to SFTP by default
  141. PostgreSQL 16: pg_dump, explicit row-security filtering
  142. PostgreSQL 16: row security, owners, FORCE and BYPASSRLS
  143. PostgreSQL 16: row_security session setting
  144. PostgreSQL 16: pg_restore, row security and INSERT versus COPY
  145. PostgreSQL 16.15: policy applicability checks before the row_security error
  146. PostgreSQL 18: pg_archivecleanup and standby staging scope
  147. PostgreSQL 16.15: timeline-independent cleanup and short options
  148. PostgreSQL 18.0: cleanup selection and backup-history option
  149. Hesela: PostgreSQL 16.15 native dry-run filename probe, 10 cases
  150. etcd 3.6: recovery, revision rollback and revision bump
  151. etcd 3.6: inclusive watch start, cancellation and range reads
  152. etcd v3.6.16: watcher_group.go, chooseAll strict compaction boundary
  153. etcd v3.6.16: snapshot restore option validation
  154. Hesela: etcd 3.6.16 native restore/watch controls and four raw captures
  155. Hesela: SQLite destination compatibility, native observations and reproduction
  156. SQLite: PRAGMA page_size, deferred changes and non-WAL VACUUM
  157. SNIA Dictionary: Network Data Management Protocol and separate control/data transfer
  158. NDMPv4 archived Internet-Draft 01 (2001), sections 2.3.2-2.3.5: services and file history
  159. NetApp ONTAP 9: common NDMP tape backup topologies
  160. Oracle ZFS Storage Appliance Administration Guide (2014): NDMP backup formats and types
  161. NetApp ONTAP 9: NDMP file-history generation and SMTape scope

Backup sources reviewed 13 October; PITR and backup-type sources reviewed 14 October; S3 retention and S4 history-coverage sources reviewed 15 October 2026; default-retention assignment and S4 client-cache boundaries reviewed 2 November 2026. SQLite and rsync backup sources reviewed 17 October 2026. PostgreSQL backup-tool examples use version 18; the separate sequence-contract section uses version 16 and was reviewed 28 October 2026. NIST is used for the distinction between control types, not as a claim of certification or universal legal obligation.

Published by Hesela team · Published · Updated

Report a correction · Editorial standards · Reuse guidance

Change history

: first published.

  1. · Update: Published default/explicit/replica retention comparison and dated observation guidance; explained the S4 client-cache capture boundary from the original OSDI 2000 paper.
  2. · Update: Added 21 controlled SQLite backup-progress runs: writer identity changes restart behavior, while a retained WAL view preserves progress but copies an older generation. Complete traces, driver and tests are provided.
  3. · Update: Connected 84 retained native observations on two SQLite builds to source-read ownership after backup completion or cancellation, BEGIN-only controls and journal_size_limit boundaries.
  4. · Update: Added scoped backup-isolation guidance and historical-access boundaries; corrected overbroad air-gap claims in the linked corpus and indexed self-securing storage from OSDI 2000.

: latest recorded update. A detailed change note is not available for this revision.

New-publication RSS · Correction RSS

Cite this page
Hesela team. Backup verification is not a restore test. Hesela. 2026-11-29. https://hesela.com/analyses/backup-verification-is-not-a-restore-test/