In this little how-to I will show you how to backup a public SVN repository thanks to SVK , a tool build upon SVN framework that add decentralized capabilities.
First, create a local repository:
1$ svk mirror //local https://[email protected]/home/kde
SVK will ask you to create a new repository. Tell it you want so:
Repository /home/user/.svk/local does not exist, create? (y/n) y
Then, sync the remote repository with the local one:
1$ svk sync //local
Thatβs all!
To update your locale repository with the latest set of changes from the remote one, just run the previous command from time to time.
Now you can play with your local repository (
/home/user/.svk/local
in this
example) as if it was a normal SVN repository!
Update
: If you want to generate a vanilla SVN dump out of your SVK local
mirror, as suggest by
Thomas MΓΈlhave
in his
β
Remote Backup Of A Subversion (svn) Repository
β
blog post, use
svnadmin
:
1$ svnadmin dump -r2:HEAD ~/.svk/local > my-repository-dump
1 archived comment
Comments are closed. These were posted on Disqus, and are archived here.
-
There's a problem with this approach. The
svk mirorcommand generates a commit in the just created repository. So all the commits created by the subsequent sync will have revision numbers incremented by one as compared to the remote public repository.This is not an exact backup, and may be a problem if the repository is used with some other component that relies on revision numbers. (e.g. such as trac)