Saturday, 29 May 2010

Backup and Restore a Subversion Repository

Sometimes, you just have to do serious maintenance to a server, like install a new instance of your operating system from scratch with a new partition layout. If this server happens to be your Subversion server, you need to backup your repository and restore it once you're done with the maintenance. Or maybe you just want to move your repository from one server to another. Here's how to do it. The commands below need to be performed on the SVN server by a user who has write access to the repository (in theory any SVN admnistrator).

First, here's how back up the repository to a compressed file:

$ svnadmin dump /path/to/repo | gzip > backup.gz

And how to restore it:

$ gunzip -c backup.gz | svnadmin load /path/to/repo

Those commands are meant for UNIX or Linux so you will have to adapt them if you are running Windows. It shouldn't be too difficult to do so, especially if you are using Cygwin.

1 comment:

Help in Homework said...

If any subject has an equal number of fans and haters, it should be hands down, the subject of Mathematics. In whichever category you may fall, you may be a fan or a hater, there may be times when you would need math homework help. In such a situation a wise student would get in touch with the experts at Help in Homework and get all their Math homework done in a jiffy and at the best market price. So, you decide do you want o be one of the wiser students? If yes, then connect with our talented experts now.