My linux world » Subversion Survival Guide

Subversion Survival Guide


To create a repository

svnadmin create /my/svn/database
chown -R apache:apache /my/svn/database
chmod -R 750 /my/svn/database

To recover a database

svnadmin recover /my/svn/database
chown -R apache:apache /my/svn/database
chmod -R 750 /my/svn/database

To launch svn as daemon

* You can launch svn as daemon instead of http. Launch the following command:

 svnserve --daemon --root "/my/svn/repo"

=> “Svnserve will now start waiting for incoming requests on port 3690.
The — daemon switch tells svnserve to run as a daemon process, so it will run until it is manually stopped.

* To launch svn serve as service:

 sc create svnserve binpath= "/my/svn/repo" --service --root "/my/svn" displayname= "Subversion" depend= tcpip start= auto

To dump/load database

I recommand to create one dump file by revision.
When dumping the database, check for each dump if the endline exists: ——- Révision 1 propagée (commit) >>>
When loading the database, check if the last revision of the new repo is equals to the dump revision.

* To dump database:
r1, r2 are two revisions:

 svnadmin dump /my/svn/repo -r r1:r2 > revs-r1-r2.fichier-dump

* To load database:

svnadmin load /my/svn/repo < dump-file

To synchronize database

 # 1st initialize new depot:
  svnsync initialize http://myNewDepot http://myDepot
 # 2nd, launch synch:
  svnsync synchronize http://myNewDepot

Copyright © 2023 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.

Fork me on GitHub