tags:

views:

30

answers:

3

Hello,

CentOS 5.3

I have a directory called repos. Inside that directory I have repositories and subdirectories of repositories. There are more than 30 repositories in all.

We are now moving our repositories to another server. I am just wondering what is the best way to copy all the repositories.

I have looked at svnadmin dump and hotcopy. However, I would like to copy all the repositories recursively. I am not sure that dump and hotcopy allow you to copy all the directories.

I could use hotcopy. However, that would take forever if I have to do them one at a time.

Would it be safe to do a just a normal file copy i.e. scp -r source dest

Many thanks for any suggestions,

+1  A: 

Yes you can very well do a scp from source to destination. you might just need to make the appropriate configuration/commandline changes while starting svn.

Version Control Buddy
+1  A: 

I could use hotcopy. However, that would take forever if I have to do them one at a time.

You can try to use bash scripting:

for d in /srv/svnroot/* ; do svnadmin dump $d | ssh targetserver svnadmin load $d ; done

Where /srv/svnroot is your directory with the svn repositories and targetserver you new server.

I would not really recommend scp, it works only with FSFS repositories and you have to make sure that nobody can access them while you copy.

Turbo J
A: 

Hello,

I found another way.

Which is using rsync. That is what I did and it worked ok.

rsync -rcaz -e ssh [email protected]:/svn_repos [email protected]:/svn_repos
robUK