[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using python to invoke svnadmin?

From: Blair Zajac <blair_at_orcaware.com>
Date: Wed, 13 Aug 2008 10:11:15 -0700

Robert Dailey wrote:
> Hi,
> I want to create a python script that performs an "svnadmin dump" for
> backup/archival purposes. I realize I could just use python to invoke a
> command, but I wanted to avoid that if possible. Is there a module
> somewhere that facilitates an interface into the svnadmin program? I
> basically need the python equivalent of "svnadmin dump /my/repo >
> my_backup". Thanks.

First, if you're not doing anything special with your backup script, then just use


which comes with Subversion. It compresses backups, keeps N old ones around and
is generally the tool people use to backup their repositories.

If you need to use your own custom backup and don't want to shell out, then use

$ python
>>> import svn.repos
>>> svn.repos.dump_fs2
<function svn_repos_dump_fs2 at 0xf77d66f4>

See svn_repos.h on how to use it.


To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-13 19:11:46 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.