Thursday, March 14, 2013

Useful SVN adminitrator command

Export svn
- When I don't know SVN credential. but I have access to repository server
$svn export --force file:///home/svn/myrepos ./myrepos


Check User access control
$cat /home/svn/myrepos/conf/authz
$cat /home/svn/myrepos/conf/passwd
$cat /home/svn/myrepos/conf/svnserve.conf


Create version 1.6 compatible Repository
$svnadmin create myrepos --pre-1.6-compatible


Dump svn repository
$svnadmin dump /home/svn/myrepos > /home/backup/svn/myrepos.dump


Incremental dump svn repository
- SVN incremental Backup
$ svnadmin dump myrepos --revision 0:1000 > dumpfile1
$ svnadmin dump myrepos --revision 1001:2000 --incremental > dumpfile2
$ svnadmin dump myrepos --revision 2001:3000 --incremental > dumpfile3
$ svnadmin dump <repos> -r 58:HEAD --deltify > <file2> 


Import dump file
$ cd /home/svn
$ svnadmin load --bypass-prop-validation myrepos < /home/backup/svn/myrepos.dump


Incremental import dump file
- SVN recovery 
* incremental :
$ svnadmin load < ~/repos-0-1000.svn_dump
$ svnadmin load < ~/repos-1000-2000.svn_dump
$ svnadmin load < ~/repos-2000-3000.svn_dump


Kill SVN daemon on Solaris
$ pkill -KILL svnserve


Start SVN daemon
$ svnserve -d -r /home/svn/


Pack svn
- SVN revision pack per 1000 revision
$ svnadmin pack /home/svn/sfc


No comments:

Post a Comment