Programming

How to backup or Mirror a Subversion Repository

Mirror SVN Repository

svnadmin hotcopy /path/to/repository /path/to/mirror

 
Backup SVN Repository

svnadmin dump /path/to/repository > /path/to/repository.dump

 
Backup SVN Repository and compress it

svnadmin dump /path/to/repository | gzip > /path/to/repository.dump.gz

 
Backup SVN Repository, compress it and move it to another machine with scp

svnadmin dump /path/to/repository | gzip > /path/to/repository.dump.gz ; scp -rp /path/to/repository.dump.gz user@server.domain.com:/path/to/repo

 
Uncompress SVN Repository

gunzip repository.svndump.gz

 
Restore SVN Repository

svnadmin load /path/to/repository > /path/to/dump/repository.dump