Before Handing SVN to a SaaS Host: How Much Can One Backup Restore?

"Daily backups" alone does not guarantee you can get back to work. What svnadmin dump and hotcopy each capture, four things to restore (source history, path permissions, commit hooks and file locks), a sample-repository test that checks data recovery and work recovery separately, and the question to ask before signing.

John Baek
John Baek
Founder, CollabOps
2 min read

The SVN hosting proposal says "daily backups." When the repository fails, someone needs to download drawings again, someone else must still be blocked from the billing path, and commits without an approval number must still be rejected after the restore. Monday's work can only resume when all three hold.

The value of an SVN backup isn't whether the data was copied but whether the restored repository behaves as before, with permissions, hooks and locks intact, so the team can get back to work.

What do svnadmin dump and hotcopy each capture?

Start by asking what the provider's "one backup" actually contains. svnadmin dump captures the versioned history of repository changes, but not current file locks, hook scripts or server-specific configuration. svnadmin hotcopy copies the repository directory's database, hooks and config files together. The difference is laid out in the repository maintenance chapter of the SVN book. Company authentication systems and permission settings kept outside the repository are a separate restore scope. Also check, contract by contract, in what format a managed service hands your data back.

What to restoreWhat to ask the hosting providerWhat the team should test itself
Source and revision historyDelivery format, latest recoverable point, export procedureCheck out files from a chosen past revision and compare with the original
Per-path permissionsExport and restore scope of the authz file or equivalent policyConfirm a regular developer account cannot open a restricted path
Commit hooksWhich custom hooks are supported and who restores themConfirm a test commit without an approval number is rejected and a valid one is accepted
File locks in useWhether lock state is preserved, and the handover process if locks must be re-acquiredConfirm what the original lock holder and a second user can each do on the same file

If the property came back, did the lock come back too?

A good test case is the svn:needs-lock property on a drawing versus "who has this drawing locked right now." The first is a versioned property on the file. The second is a user lock currently held in the repository. Conclude that existing locks were handed over just because the property is visible after a dump restore, and two people may start editing the same drawing. How locking differs between tools is covered in Comparing SVN, Git LFS and Perforce for teams that must lock large files.

How do you start a restore test?

One sample repository is enough. Record the 10 a.m. backup point as r842 and add r843 at 10:07. (Revision numbers and times are illustrative.) Restore into a separate environment and confirm which revision you can actually read up to. Then access it with two accounts that have different permissions, make one new commit through the hooks, and hand over a lock. Finally, record the last restored revision and the time users resumed normal work, and you can sign off data recovery and work recovery separately.

Before signing a SaaS contract, the question can go one step past "Do you back up?": "Using only what you hand us on the day the contract ends, could we rerun these four tests in another environment?"

  • #svn
  • #scm
  • #self-hosted
  • #compliance
  • #migration