1

We have subversion repositories that are accessed via svn+ssh and apache's svn module. Is there any problem with just backing up the repository directories directly, or will I get something out of doing an svnadmin dump on them?

I'm currently of the opinion that a backup copy of the directories is fine.

1
  • Lately I've been using svnsync.
    – Angelo
    Dec 31, 2015 at 3:56

2 Answers 2

4

See here: Best way to do Subversion backups? as it will answer your question overall I believe.

NOTE: the below is based on my own sysadmin experience. I'm not a Subversion expert, and you might get more informed answers over on StackOverflow.

Personally, I had to backup an SVN server in the past and I used svnadmin dump even though the Engineering dept. head there swore that his nightly rsync was just as valid. There is a risk with rsync if the repos are in use though that the rsync won't catch everything.

For me I ended up leaving his rsync cron job in place to keep him happy and doing the svnadmin dump to a tar file offsite.

As far as benefits of svnadmin dump or hotcopy, I can't really think of any to be honest, at least in a DR scenario, other than that they can make sure they get online repos in use.

2
  • 1
    This is mostly true (assuming FSFS) although the state on disk should be consistent so file level backups should be ok. But exporting is never a bad idea, especially if your repositories are used by a lot of folks or have large checkins. See svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2 Sep 20, 2013 at 16:50
  • Thanks. In my case the repos are relatively large but changed infrequently (especially overnight). The reason I don't like dump is because of the size... but maybe hotcopy is worth a try.
    – Angelo
    Sep 20, 2013 at 22:33
2

Never use file-level backups of the SVN repository directories. Even if you are using FSVS.

"svnadmin dump" is good for long-term archives because it is platform-neutral. The downside is it takes a lot longer to generate and uses up a lot more space (even compressed with gzip -5). It also fails to backup things like the repository scripts and a few other things.

"svnadmin hotcopy" is our preferred method for nightly backups. With SVN 1.8, the hotcopy process is incremental and you no longer have to delete the target directory prior to the hotcopy. Our nightly hotcopy went from 2-3 hours down to 10-15 minutes after switching to SVN 1.8.

(After we do the hotcopy, we use rdiff-backup and push to a backup server. This has the advantage that we can revert the repository to any day within the last 6 months.)

A third option is svnsync, where you keep a warm-spare SVN server up and running.

1
  • Since we aren't using 1.8 I guess dump is the better option since it can be incremental.
    – Angelo
    Oct 9, 2013 at 22:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .