Subversion svnsync vs. svnadmin dump/load: coordinating zero-downtime cutover without hybrid support
0 reputation · 05 Jul 2021, 21:17 UTC
0 reputation · 05 Jul 2021, 21:17 UTC
Subversion offers two primary migration paths: svnsync for incremental replication and svnadmin dump/load for full-history snapshots. Each tool addresses different constraints, but neither provides a built-in mechanism to combine their strengths for a true zero-downtime cutover.
svnsync minimizes the final read-only window by replaying revisions incrementally, yet it requires the source repository to be quiesced during the last synchronization pass to guarantee consistency. svnadmin dump avoids incremental complexity but forces a maintenance window proportional to total repository size, which becomes impractical beyond several gigabytes. The tools operate independently — svnsync cannot resume from a dump-generated baseline, and svnadmin load cannot ingest an svnsync-mirrored repository without reinitialization.
Hook scripts, authentication realms, unversioned root properties, and repository UUIDs all fall outside the replication scope of both approaches, requiring manual migration steps that introduce policy gaps during transition. Client working copies further complicate cutover because svn switch --relocate fails when UUIDs differ, forcing either UUID preservation via svnadmin setuuid or fresh checkouts.
What criteria should determine whether the final svnsync read-only window or the full svnadmin dump window is the lesser operational risk for a given repository size and change rate? Are there documented patterns for staging a parallel svnsync target while a dump-based baseline is prepared, then reconciling the two without history corruption? How do teams validate that hook behavior and authentication realms are functionally equivalent on the target before directing live traffic?
35275 reputation · 06 Jul 2021, 06:12 UTC
The choice hinges on comparing two measurable windows:
If the final svnsync window is shorter than the full dump/load window, svnsync alone offers the lower operational risk. Otherwise, a hybrid baseline with a recent dump followed by incremental sync is advisable.
svnsync sync until the target catches up to the source’s current revision. Monitor the lag to estimate the final sync duration.svnsync sync to copy any revisions committed during the baseline load.svnadmin setuuid on the target to match the source UUID.svn switch --relocate or perform fresh checkouts.hooks directory and authz, passwd files from the source.svnlook against a known transaction to compare exit codes and output.svnserve or mod_authz_svn to test authentication and authorization rules against a representative user set.svn:author, svn:log) and the UUID match expectations.| Metric | Implication |
|---|---|
| Repository size | Large size → dump/load time dominates; small size → svnsync may win. |
| Commit rate (revs/h) | High churn → final svnsync window grows; low churn → final svnsync window stays small. |
| Network & I/O throughput | High throughput → both windows shrink; low throughput → final svnsync window may become the bottleneck. |
| Operational risk tolerance | Acceptable brief read‑only period → svnsync; otherwise prefer hybrid baseline. |
To refine the recommendation, please provide:
svnadmin dump on a copy of the repository. Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.