Repository Maintenance

Maintaining a Subversion repository can be daunting, mostly due to the complexities inherent in systems that have a database backend. Doing the task well is all about knowing the tools—what they are, when to use them, and how. This section will introduce you to the repository administration tools provided by Subversion and discuss how to wield them to accomplish tasks such as repository data migration, upgrades, backups, and cleanups.

An Administrator’s Toolkit

Subversion provides a handful of utilities useful for creating, inspecting, modifying, and repairing your repository. Let’s look more closely at each of those tools. Afterward, we’ll briefly examine some of the utilities included in the Berkeley DB distribution that provide functionality specific to your repository’s database backend not otherwise provided by Subversion’s own tools.

svnadmin

The svnadmin program is the repository administrator’s best friend. Besides providing the ability to create Subversion repositories, this program allows you to perform several maintenance operations on those repositories. The syntax of svnadmin is similar to that of other Subversion command-line programs:

$ svnadmin help
general usage: svnadmin SUBCOMMAND REPOS_PATH  [ARGS & OPTIONS ...]
Type 'svnadmin help <subcommand>' for help on a specific subcommand.
Type 'svnadmin --version' to see the program version and FS modules.

Available subcommands:
   crashtest
   create
   deltify
...

Earlier in this chapter (in Creating the Repository ...

Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.