# svn-backup-dumps(1) - man - phpman

[svn-backup-dumps(1)](https://www.chedong.com/phpMan.php/man/svn-backup-dumps/1/markdown)                    General Commands Manual                   [svn-backup-dumps(1)](https://www.chedong.com/phpMan.php/man/svn-backup-dumps/1/markdown)



## NAME
       svn-backup-dumps - Create dumpfiles to backup a subversion repository.

## SYNOPSIS
       **svn-backup-dumps** _<repos>_ _<dumpdir>_

## DESCRIPTION
       **svn-backup-dumps**  creates  dumpfiles from a subversion repository.  It is intended for use in
       cron jobs and post-commit hooks.

       The basic modes of operation are:

       •      Create a full dump (revisions 0 to HEAD)

       •      Create incremental dump containing at most N revisions.

       •      Create incremental single-revision dumps (for use in post-commit).

       Dumpfiles are named in the format _basename_._rev_.svndmp or _basename_._rev_._rev_.svndmp, where _base__‐
       _name_  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.

       Optionally, **svn-backup-dumps** can compress dumpfiles with **gzip** or **bzip2**, and can transfer them
       to another host using FTP or SMB (using **smbclient**).

## OPTIONS
### --version
              Show program's version number and exit.

### -h --help
              Show this help message and exit.

### -b

### --deltas
              This is passed through to **svnadmin** **dump**.

### -c
              Maximum number of revisions per dumpfile.

### -o

### -O

### -q

### -r

### -t
### -t
              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 _%r_ in the path is replaced
              by the repository name.  Support for "smb:" requires the **smbclient** program.

### -z

## EXAMPLES
       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 num‐
       ber.

       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.

       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_.

       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.

## AUTHOR
       Voluntary contributions made by many individuals.  Copyright © 2006 CollabNet.



                                             2006-11-09                          [svn-backup-dumps(1)](https://www.chedong.com/phpMan.php/man/svn-backup-dumps/1/markdown)
