Home | Trees | Indices | Help |
|
---|
|
Provides an extension to back up Subversion databases.
This is a Cedar Backup extension used to back up Subversion repositories via the Cedar Backup command line. Each Subversion repository can be backed using the same collect modes allowed for filesystems in the standard Cedar Backup collect action: weekly, daily, incremental.
This extension requires a new configuration section <subversion> and is intended to be run either immediately before or immediately after the standard collect action. Aside from its own configuration, it requires the options and collect configuration sections in the standard Cedar Backup configuration file.
There are two different kinds of Subversion repositories at this
writing: BDB (Berkeley Database) and FSFS (a "filesystem within a
filesystem"). Although the repository type can be specified in
configuration, that information is just kept around for reference. It
doesn't affect the backup. Both kinds of repositories are backed up in
the same way, using svnadmin dump
in an incremental
mode.
Author: Kenneth J. Pronovici <pronovic@ieee.org>
|
|||
RepositoryDir Class representing Subversion repository directory. |
|||
Repository Class representing generic Subversion repository configuration.. |
|||
SubversionConfig Class representing Subversion configuration. |
|||
LocalConfig Class representing this extension's configuration document. |
|||
BDBRepository Class representing Subversion BDB (Berkeley Database) repository configuration. |
|||
FSFSRepository Class representing Subversion FSFS repository configuration. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
logger = logging.getLogger("CedarBackup2.log.extend.subversion")
|
|||
SVNLOOK_COMMAND =
|
|||
SVNADMIN_COMMAND =
|
|||
REVISION_PATH_EXTENSION =
|
|
|
|
|
|
|
|
Gets exclusions (file and patterns) associated with an repository directory. The returned files value is a list of absolute paths to be excluded from the backup for a given directory. It is derived from the repository directory's relative exclude paths. The returned patterns value is a list of patterns to be excluded from the backup for a given directory. It is derived from the repository directory's list of patterns.
|
Backs up an individual Subversion repository. This internal method wraps the public methods and adds some functionality to work better with the extended action itself.
|
Opens the output file used for saving the Subversion dump. If the compress mode is "gzip", we'll open aGzipFile , and if the compress mode is "bzip2",
we'll open a BZ2File . Otherwise, we'll just return an
object from the normal open() method.
|
Loads the indicated revision file from disk into an integer. If we can't load the revision file successfully (either because it doesn't exist or for some other reason), then a revision of -1 will be returned - but the condition will be logged. This way, we err on the side of backing up too much, because anyone using this will presumably be adding 1 to the revision, so they don't duplicate any backups.
|
Writes the end revision to the indicated revision file on disk. If we can't write the revision file successfully for any reason, we'll log the condition but won't throw an exception.
|
Backs up an individual Subversion 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 fromopen , 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.
Notes:
|
svnlook .
Note: This function should either be run as root or as the owner of the Subversion repository. |
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Mon May 5 19:58:07 2008 | http://epydoc.sourceforge.net |