NAME

svn-dump.pl - Dump a Subversion repository


SYNOPSIS

    svn-dump.pl [ --verbose ] [ --usage|-? ] [ --help ]
                [ --from-revision=<int> ] [ --to-revision=<int> ]
                [ --[no]deltas ] [ --[no]incremental ]
                [ --repository=<repos-path> | <repos-path> ... ]


DESCRIPTION

Dumps one or more Subversion repositories, each to the latest of a series of numbered files in the current directory. If the /home/me/svn/foo repository is being dumped, its latest revision is 317, and the most recent previous dump file is foo-308-311.svndump, then the dump will be written to a file named foo-312-317.svndump; if this file already exists, then svn-dump.pl exits immediately. This is useful for running from a cron job:

    # Back up Subversion repositories daily at 00:50.  This is ten minutes before
    # the normal /home partition backup time. 
    50 0 * * *  cd /home/rogers/projects/svn-dump && svn-dump.pl /shared/svn/*

The resulting series of dump files play nicely with incremental filesystem dumps.

If more than one repository path is specified on the command line, then the --from-revision and --to-revision options apply only to the first.

While svn-dump.pl is running, standard error is redirected to a file in the local directory that matches ``svn-dump-errors-*.text''. If svn-dump.pl exits normally, then the file is deleted. Otherwise, it will contain messages from ``svn dump'' and svn-dump.pl, and may be of use in figuring out what went wrong. (If the expected dump files are not there, and the error output is also missing, be sure to check that the current directory is writable by the svn-dump.pl process.)


OPTIONS

--verbose

If specified, extra information messages are printed. [Not actually used at present. -- rgr, 3-Jun-06.]

--usage

Prints a brief usage message.

--help

Prints a more detailed help message.

--from-revision

Specifies the starting revision to dump; this only applies to the first repository if more than one is specified. The default is one plus the revision in the latest foo-*.svndump file, or zero if there are no matching files. Specify --from-revision=0 to get everything.

--to-revision

Specifies the latest revision to dump; this only applies to the first repository if more than one is specified. If omitted, svn-dump.pl asks Subversion for the number of the latest revision.

--[no]deltas

Specifies whether or not each revision of the series after the first should be dumped as binary deltas with respect to the previous revision. The default is --deltas.

--[no]incremental

Specifies whether or the first revision of the series should be dumped incrementally with respect to the previous revision. If --noincremental is specified, the --from-revision is treated as if it was indeed the first revision, with all previous revisions merged into it. The default is --noincremental if --from-revision is zero (i.e. we are dumping the whole thing anyway), and --incremental otherwise (the usual case).

--repository

Specifies the path to the Subversion repository to be dumped. This may also be specified as a positional argument, i.e. without the --repository prefix. Any number of positional repository paths may be specified; if --repository is also specified, then that path is considered to be the first.


USAGE AND EXAMPLES

[need some. -- rgr, 3-Jun-06.]


SEE ALSO

Subversion (http://www.collab.net/products/subversion.html)
svnadmin dump (http://svnbook.red-bean.com/nightly/en/svn.ref.svnadmin.c.dump.html)
Bob's Subversion page (http://www.rgrjr.com/linux/subversion.html)


VERSION

 $Id: svn-dump.pl 200 2009-01-02 04:21:58Z rogers $


BUGS

If you find any, please let me know.


COPYRIGHT

 Copyright (C) 2006 by Bob Rogers <rogers@rgrjr.dyndns.org>.
 This script is free software; you may redistribute it and/or modify it
 under the same terms as Perl itself.


AUTHOR

Bob Rogers <rogers@rgrjr.dyndns.org>