Subversion Extension

The Subversion Extension is a Cedar Backup extension used to back up Subversion [31] version control repositories via the Cedar Backup command line. It is intended to be run either immediately before or immediately after the standard collect action.

There are two different kinds of Subversion repositories at this writing: BDB (Berkeley Database) and fsfs (a more CVS-like "filesystem within a filesystem"). This extension only works with BDB repositories. Each Subversion repository can be backed using the same collect modes allowed for filesystems in the standard Cedar Backup collect action (weekly, daily, incremental) and the output can be compressed using either gzip or bzip2.

To enable this extension, add the following section to the Cedar Backup configuration file:

<extensions>
   <action>
      <name>subversion</name>
      <module>CedarBackup2.extend.subversion</module>
      <function>executeAction</function>
      <index>101</index>
   </action>
</extensions>
      

This extension relies on the options and collect configuration sections in the standard Cedar Backup configuration file, and then also requires its own subversion configuration section. This is an example Subversion configuration section:

<subversion>
   <collect_mode>incr</collect_mode>
   <compress_mode>none</compress_mode>
   <repository>
      <abs_path>/opt/public/svn/software</abs_path>
      <collect_mode>daily</collect_mode>
   </repository>
   <repository>
      <abs_path>/opt/public/svn/web</abs_path>
      <compress_mode>gzip</compress_mode>
   </repository>
</subversion>
      

The following elements are part of the Subversion configuration section:

collect_mode

Default collect mode.

The collect mode describes how frequently a Subversion repository is backed up. The Subversion extension recognizes the same collect modes as the standard Cedar Backup collect action (see Chapter 2, Basic Concepts).

This value is the collect mode that will be used by default during the backup process. Individual repositories (below) may override this value. If all individual repositories provide their own value, then this default value may be omitted from configuration.

Note: if your backup device does not suppport multisession discs, then you should probably use the daily collect mode to avoid losing data.

Restrictions: Must be one of daily, weekly or incr.

compress_mode

Default compress mode.

Subversion repositories backups are just specially-formatted text files, and often compress quite well using gzip or bzip2. The compress mode describes how the backed-up data will be compressed, if at all.

This value is the compress mode that will be used by default during the backup process. Individual repositories (below) may override this value. If all individual repositories provide their own value, then this default value may be omitted from configuration.

Restrictions: Must be one of none, gzip or bzip2.

repository

A Subversion repository be collected.

This is a subsection which contains information about a specific Subversion repository to be backed up.

This section can be repeated as many times as is necessary. At least one repository directory must be configured.

The repository subsection contains the following fields:

abs_path

Absolute path of the Subversion repository to back up.

Restrictions: Must be an absolute path.

collect_mode

Collect mode for this repository.

This field is optional. If it doesn't exist, the backup will use the default collect mode.

Restrictions: Must be one of daily, weekly or incr.

compress_mode

Compress mode for this repository.

This field is optional. If it doesn't exist, the backup will use the default compress mode.

Restrictions: Must be one of none, gzip or bzip2.