Monday, December 8, 2008

Setup new repository in SVN failed.

Move a Subversion repository from one machine to another

Even if the machines are on different operating systems, this is dead easy. On the source machine, simply 'dump' the repository:

svnadmin dump /path/to/repo > reponame.dump
tar zcf reponame.tgz reponame.dump
scp reponame.tgz hostname:/path/to/new/repo

Then login to the new machine, and set up the new repo:

cd /path/to/new
svnadmin create reponame
tar zxf reponame.tgz
svnadmin load reponame < reponame.dump

That's all there is to it. Then you can of course delete the dump files, the .tgz files, and even the source repo if you are brave.


All those are fine. But I can't access repository. Spend hours and then figured out SELinux security restriction cause the problem.
Martin said I can use audit2why to generate a policy script and apply it by using audit2allow. But I didn't make it work.

Find a command from http://subversion.tigris.org/faq.html, How do I set repository permissions correctly?
  $ chcon -R -h -t httpd_sys_content_t PATH_TO_REPOSITORY

Then problem solved.

No comments:

Google+