Moving a SVN Repository

From PaskvilWiki
Jump to: navigation, search
  • on source machine:
svnadmin dump /path/to/repo > repo.dump
  • transfer the file to the destination machine, then on the destination machine:
cd /repos/path
svnadmin create new-repo
svnadmin load new-repo < repo.dump

Note: if your repo is mature/large, you'll probably want to add compression along the way.

Note: if you have more than one repo on the source machine, all in the same folder (/repos/path), you can do:

  • on source machine:
cd /repos/path
for i in `ls`; do svnadmin dump $i > $i.dump
tar cfz dumps.tar.gz *.dump
rm *.dump    # just to clean-up
  • transfer the dumps.tar.gz to the destination machine, then:
mkdir /new/repos/path
tar xfz dumps.tar.gz
for i in `ls *.dump`; do
    svnadmin create `basename $i .dump`;
    svnadmin load `basename $i .dump` < $i;
rm dumps.tar.gz *.dump    # just to clean-up