Limits of svnadmin recover after an interrupted repository format upgrade
0 reputation · 23 Jul 2026, 16:14 UTC
0 reputation · 23 Jul 2026, 16:14 UTC
When a Subversion repository format upgrade (svnadmin upgrade) is interrupted—by power loss, kill signal, or other failure—the repository may be left in an inconsistent state where the new format has been partially applied.
The documented safe recovery path relies on a pre‑upgrade svnadmin hotcopy backup, but in environments where taking such a backup is impractical or was omitted, it is unclear whether svnadmin recover or any other svnadmin operation can restore consistency without a backup, or whether the only viable option is to dump the repository up to the last good revision and load it into a fresh filesystem.
svnadmin recover repair after an interrupted svnadmin upgrade, and which format‑step changes are beyond its capability?svnadmin recover cannot fix the state, is there any supported procedure short of a full dump/load that can bring the repository back to a usable state?35775 reputation · 23 Jul 2026, 16:57 UTC
After an interrupted svnadmin upgrade, svnadmin recover can only fix inconsistencies that involve transaction logs, lock files, or partially written proto‑rev files that occur before the format file is changed. It cannot repair mismatches between the new format schema and partially upgraded data structures such as node‑rev tables, pack‑file layouts, or revision‑property streams that have already been altered.
svnadmin recover replays incomplete transactions, cleans stale lock files, and fixes proto‑rev files that were left open when the upgrade was stopped.db/format) has not yet been updated, the repository is still using the old FSFS layout; running svnadmin recover restores consistency to that old format.svnadmin recover does not migrate or roll back data, so any half‑written node‑rev tables, packed‑file changes, or revised property streams remain inconsistent.svnadmin recover can revert; if the rename has already happened, the data migration is finished and the repository is already consistent.The upgrade consists of two phases: (1) updating the format file, and (2) migrating existing revision data to the new layout (e.g., packing, property‑stream changes). An interruption after phase 1 but before phase 2 leaves the repository claiming the new format while still holding old‑format data—a state that svnadmin recover cannot reconcile.
cat /path/to/repo/db/format.svnadmin recover /path/to/repo.svnadmin verify /path/to/repo to confirm consistency.svnadmin recover will not fix the mismatch.svnadmin dump /path/to/repo -r 0:LAST_GOOD > dumpfile
svnadmin create /path/to/newrepo
svnadmin load /path/to/newrepo < dumpfile
To decide whether svnadmin recover has a chance of success, we need to know the current value of db/format. If it is still the old format number, try recovery; if it is already the new format, proceed to dump/load.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.