PDA

View Full Version : Am I backing up SVN correctly?



Eugene_Bondarenko
January 6th, 2010, 06:22 PM
Hi,

I am running Ubuntu 9.10 and I've set SVN server on my comp. I've installed one of the programs (sbackup) from software center and set it to run incremental backups for many places including my svn server (located in /home/svn/). However I am not fully aware of how SVN server works so I am not sure whether I am making backups correctly. Does it store everything in filesystem? So if I backup its directory (/home/svn/), do I get everything related to my repositories backed up? It doesn't store any data in some kind of DB or in some other directories, right?

iharrold
January 6th, 2010, 10:26 PM
Backup:



$ svnadmin dump /Path/To/Repository/Repo > /Store/Backup/Here/MyRepobackup.dump


Restore:



$ sudo svnadmin load /Path/To/Repository/Repo < /Store/Backup/Here/MyRepobackup.dump


The dump can be tar.gz or bz2'd to compress it for size aswell.
Compress:


$ tar -cvzf /Store/Backup/Here/MyRepobackup.tar.gz /Store/Backup/Here/MyRepobackup.dump


UnCompress:


$ tar -xvzf /Store/Backup/Here/MyRepobackup.tar.gz -c /Store/Backup/Here/

The repository is really a DB on the server. The Dump copies out the repository(with history) to an archived raw file.

not_a_phd
January 9th, 2010, 12:00 AM
I have copied svn repository directories from a server to another machine, and have been able to access them by the:


svn checkout svn://pathtorepo/reponame

command.

The svnadmin backup method is probably both more efficient and safer though.

Eugene_Bondarenko
January 10th, 2010, 01:12 PM
Thanks, that helped!