You can use Windows Server Backup to backup Subversion repositories. It allows you to shedule backups
to a network share, dedicated backup volume, writeable media. For example, wbadmin
command-line tool allows you to safely backup your repositories. This simple command performs one-time copy backup of C:\foo\bar
to X:\
volume:
wbadmin start backup –backupTarget:x: -include:c\foo\bar -vsscopy
(To install Windows Server Backup, run ocsetup WindowsServerBackup
in elevated command-prompt).
You can setup backup in different ways:
wbadmin
command-line tool,- PowerShell cmdlets, good for automation and customization of backup actions,
- Windows Server Backup wizard (control panel, actually) MMC snap-in.
It's not required to stop server's service when you run the backup because FSFS repository backend is always in consistent state.
Here are general tips about recovering Subversion repository from a backup:
Recover repository backup to an empty directory to make sure that restored repository files won't mix with files of the broken one. After repository if recovered, you can delete broken repository and then replace it with the recovered one.
Stop-start cycle your Subversion server after recovering repository from a backup.
If your clients get errors after repository recover, run
svnadmin recover
against it. The command finishes instantly and makes repository accessible again.