sign in
Home | Updates | Pages | Users | Admin | Help

svntips

Compact Subversion Backups

Use this command (replace /repo with your actual repository path):

svnadmin dump --deltas /repo |bzip2 |tee dump.bz2 | md5sum >dump.md5

Step by step:

  1. The important part is –deltas, which uses a more CPU intense but more storage efficient delta method.
  2. bzip2 is slower than gzip but compresses better.
  3. Now to another fun part: tee redirects the compressed data stream into the file dump.bz2 , but also writes the stream to stdout which in turn is redirected into the MD5 calculation tool.

To restore the repository, test checksum, create empty repository, restore backup:

md5sum -c dump.md5 <dump.bz2
svnadmin create newrepo
bzcat dump.bz2 | svnadmin load newrepo

Enjoy your compact and MD5 summed backup, and store dump.md5 and dump.bz2 .


Powered by JunebugWiki v0.0.31 Page last edited by stoyan on December 15, 2006 05:41 PM (diff)
[readonly] Version 2 (current) «olderversions