tags:

views:

246

answers:

2
+2  Q: 

SVN backup

I've seen lots of ways to backup a single repository in subversion. Is there any way to backup all the repositories in one go. I have lots of repositories for different projects and don't want to have to create a script every time.

+2  A: 

If you have configured all repositories to use the fsfs backend, then you can use regular file-based backup tools (such as tar, dump, rsync, ...).

If you use bsddb repositories, I recommend to convert them to fsfs, with a svndump/restore cycle.

Martin v. Löwis
+5  A: 

A single repository in Subversion is the largest unit of storage that is managed within Subversion itself. Separate repositories are just different directories, each containing one repository.

If you already have a script to back up a single repository, then you can set up that script to take the repository name/path as a parameter. Then, you could write a script like:

#!/bin/sh
for repo in /home/repositories/*; do
    backup-single-repository $repo
done
Greg Hewgill