backupBDBRepository(repositoryPath,
backupFile,
startRevision=None,
endRevision=None)
Backs up an individual Subversion BDB repository.
The starting and ending revision values control an incremental
backup. If the starting revision is not passed in, then revision zero
(the start of the repository) is assumed. If the ending revision is not
passed in, then the youngest revision in the database will be used as
the endpoint.
The backup data will be written into the passed-in back file.
Normally, this would be an object as returned from open,
but it is possible to use something like a GzipFile to
write compressed output. The caller is responsible for closing the
passed-in backup file.
-
- Parameters:
repositoryPath -
Path to Subversion repository to back up
(type=String path representing Subversion BDB repository on
disk.)
backupFile -
Python file object to use for writing backup.
(type=Python file object as from open() or
file().)
startRevision -
Starting repository revision to back up (for incremental
backups)
(type=Integer value >= 0.)
endRevision -
Ending repository revision to back up (for incremental
backups)
(type=Integer value >= 0.)
- Raises:
ValueError -
If some value is missing or invalid.
IOError -
If there is a problem executing the MySQL dump.
Notes:
- This function should either be run as root or as the owner of the
Subversion repository.
- It is apparently not a good idea to interrupt this function.
Sometimes, this leaves the repository in a "wedged" state,
which requires recovery using
svnadmin recover.
|