svn-backup-dumps(1)
πΎ svn-backup-dumps β bestie edition πΎ
okay so you know the svn-backup-dumps(1) page from the General Commands Manual? yeah. we're doing it. it's a whole vibe and honestly it's SO useful, let me put you on π«Ά
β¨ NAME β¨
svn-backup-dumps β create dumpfiles to backup a subversion repository.
like. that's the whole thing. it makes dumpfiles. it backs up your subversion repo. iconic behavior honestly π
β¨ SYNOPSIS β¨
svn-backup-dumps <repos> <dumpdir>
two args, no notes. repos and dumpdir. that's it, that's the whole invitation π
β¨ DESCRIPTION β¨
so svn-backup-dumps creates dumpfiles from a subversion repository. it's literally designed to live inside cron jobs and post-commit hooks β like it was born for that. it's giving "reliable little background gremlin that never misses" π§
the basic modes of operation are, and I'm obsessed with how clean this is:
- create a full dump (revisions 0 to HEAD)
- create an incremental dump containing at most N revisions
- create incremental single-revision dumps (for use in post-commit)
now the naming, and pay attention because this is the part everyone gets confused about:
dumpfiles are named in the format basename.rev.svndmp or basename.rev.rev.svndmp, where basename is the repository directory name, and the rev arguments are the first and last revision numbers represented in the dumpfile, zero-padded to 6 digits. six digits. not five, not seven. six. periodt π
optionally, svn-backup-dumps can compress dumpfiles with gzip or bzip2, and it can transfer them to another host using FTP or SMB (using smbclient). so it's not just a backup tool, it's a backup tool that also moves your stuff across the network π
β¨ OPTIONS β¨
okay here's the menu, bestie, read it all, I'm not letting you skip:
--versionβ show program's version number and exit. cute, quick, done.-h,--helpβ show this help message and exit. the classic "wait what does this do again" button π-bβ compress the dump using bzip2.--deltasβ this is passed through tosvnadmin dump. it's not doing anything spicy itself, it's just the messenger π¦-c countβ maximum number of revisions per dumpfile. count, okay? you're capping it.-oβ overwrite files.-Oβ overwrite all files. yes, uppercase. yes, it's different from-o. yes, they WILL judge you if you mix them up.-qβ quiet. shhh. no yapping π€«-r revβ specify a single-revision dumpfile.-t ftp:host:user:password:path,-t smb:share:user:password:pathβ transfer dumps to another machine using the FTP or SMB protocols. path is where to store the dumpfiles on the remote server; any occurrence of%rin the path is replaced by the repository name. support for"smb:"requires thesmbclientprogram.-zβ compress the dump using gzip.
ngl the -t one is doing a LOT of heavy lifting in a single flag. look at it. five colon-separated fields. it's giving main character energy and honestly? respect π
β¨ EXAMPLES β¨
this is the part where it all clicks, I promise π
πΈ full dump of everything
to create a full dump of all revisions of a repository /srv/svn/foo in the directory /var/backup/svn:
svn-backup-dumps /srv/svn/foo /var/backup/svn
the dumpfile will be named src.000000-NNNNNN.svndmp.gz where NNNNNN is the head revision number.
(yes it says src. yes you read that right. no, don't ask me why, I just work here π)
πΈ incremental dumps, max 1000 revisions each
to create incremental dumps containing at most 1000 revisions:
svn-backup-dumps --deltas -z -c 1000 /srv/svn/foo /var/backup/svn
if the youngest revision is 2923, it creates the following files:
foo.000000-000999.svndmp.gz
foo.001000-001999.svndmp.gz
foo.002000-002923.svndmp.gz
if run again, later, when the youngest revision is 3045, it creates these two files:
foo.002000-002999.svndmp.gz
foo.003000-003045.svndmp.gz
note that it does not remove the redundant file foo.002000-002923.svndmp.gz. it just leaves it there. chilling. existing. living its best life. you have to deal with that one, bestie, the tool is not gonna do it for you π
πΈ single-revision dumps from a post-commit hook
to create incremental single-revision dumps from a post-commit hook:
svn-backup-dumps -r $rev $repos /var/backups/svn
where $rev and $repos are variables previously set in the post-commit script from its command line. the dumpfile name will be in the form foo.000352.svndmp.
πΈ sending it over SMB
to send the dumpfiles to the SMB share \\ERNEST\BACKUPS in a directory \svn\foo with user svnuser and password w0rth1ng:
svn-backup-dumps -t "smb://ERNEST/BACKUPS:svnuser:w0rth1ng:svn/%r
/srv/svn/foo /tmp/tmpbackup
note that the %r in the path is replaced by the repository name foo.
note also that a local backup directory is required, at present, even when using the -t option. so don't think you can skip the second argument. you can't. put the temp dir in there. I'm serious π
β¨ AUTHOR β¨
voluntary contributions made by many individuals. Copyright Β© 2006 CollabNet.
okay that's the whole page bestie, you're now certified in svn-backup-dumps πβ¨ go forth and back up your repos responsibly. this one was dated 2006-11-09 and it's the svn-backup-dumps(1) page from the General Commands Manual β a genuine vintage icon, lowkey a legend, we love her πππ¦
π¦ where this page comes from
- debian bookworm: subversion-tools 1.14.2-4+deb12u1 Β· Apache-2.0
- debian trixie: subversion-tools 1.14.5-3 Β· Apache-2.0
- ubuntu jammy: subversion-tools 1.14.1-3build4 Β· Apache-2.0
- ubuntu jammy: subversion-tools 1.14.1-3ubuntu0.22.04.1 Β· Apache-2.0
- ubuntu noble: subversion-tools 1.14.3-1build4 Β· Apache-2.0
- ubuntu questing: subversion-tools 1.14.5-3
- ubuntu resolute: subversion-tools 1.14.5-6build1 Β· Apache-2.0
- ubuntu stonking: subversion-tools 1.14.5-6build2 Β· Apache-2.0
- Copyright 2006 by Troy Heber - taken directly from svn-backup-dumps
- Copyright (c) 2006 CollabNet
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms