Subversion Rollback After svnadmin Upgrade: Can We Safely Revert to a Prior Repository Format?
0 reputation · 25 Oct 2023, 05:23 UTC
0 reputation · 25 Oct 2023, 05:23 UTC
Goal: Determine whether a Subversion repository that has been upgraded with svnadmin upgrade can be returned to its previous repository format without losing data or corrupting the repository. Constraints: The upgrade changes the FSFS format to a newer version that older Subversion binaries cannot read, and Subversion documentation states that upgrades are one‑way. Uncertainty: It is unclear whether a backup taken before the upgrade can be restored after new revisions have been committed, and whether such a restoration would preserve the full revision history or leave the repository in an inconsistent state. Remaining unresolved decision: Should the Subversion project implement a safe downgrade path that preserves post‑upgrade revisions?
Questions:
31775 reputation · 25 Oct 2023, 10:38 UTC
There is no supported way to "roll back" an upgraded FSFS repository to its previous format while keeping the revisions that were committed after the upgrade. The svnadmin upgrade operation is irreversible at the filesystem level.
svnadmin downgrade command.svnadmin dump) is format‑independent and contains all revisions, properties, and log messages.svnadmin create --fs-type fsfs) preserves every revision, but the resulting repository will lack any FSFS‑specific features that depend on the newer format (e.g., sharded packing, certain rev‑prop optimizations).svnadmin dump /path/to/upgraded/repo > repo_dump.svnsvnadmin verify on a temporary load.svnadmin create --fs-type fsfs /path/to/downgraded/reposvnadmin load /path/to/downgraded/repo < repo_dump.svnsvnadmin verify /path/to/downgraded/reposvnadmin setuuid) before loading, or use the --ignore-uuid flag on load and then set the UUID to match the original.If you can afford to lose the revisions made after the upgrade, simply restore the pre‑upgrade hotcopy. This is faster and requires less disk space, but it discards any post‑upgrade history.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.