NOTE: The content on this page is obsolete. See the backup and migration support included in Jackrabbit 1.6.


The backup tool v1 is able to backup a repository and restore it to a blank repository. It uses as much as possible existing storage/restore mechanism.

Currently we manage the following resources:

Please feel free to comment (through the ML or this contact form to contact directly Nicolas Toper). We plan to work on a second version soon. We are currently gathering feedback and new use cases.

Design Goals

Prerequisites & Misc.

Backuping A Repository

To launch a backup, please run the following command:

where zip is the name of the file to generate, backup.xml, the name of the XML configuration file (if you don't know how to use it, please use the one included), login and password: the required userID and password.

Restoring

To restore a repository, please prepare a blank repository (available through create repository)

LaunchBackup --zip ./myzip.zip -- conf backup.xml --login nico --password p restore repository.xml repository/

where zip is the name of the backup file, backup.xml, the name of the XML configuration file (if you don't know how to use it, please use the one included), login and password: the required userID and password.

repository.xml and repository/ respectively points toward the repository.xml file and its home to restore.

Architecture

We tried as much as possible to achieve a symmetry between backup and restore. All classes can be used for backup and restore operations.

The backup tool is organized in main classes:

Configuration File

<Backup>
<WorkingFolder path="tmp/" />
  <Resources>
  <!-- The repository and the config file are automatically backupped -->
    <Resource savingClass="org.apache.jackrabbit.backup.NodeTypeBackup" />
    <Resource savingClass="org.apache.jackrabbit.backup.NamespaceBackup" />
    <Resource savingClass="org.apache.jackrabbit.backup.NodeVersionHistoriesBackup" />
    <Resource savingClass="org.apache.jackrabbit.backup.AllWorkspacesBackup" />
   </Resources>
</Backup>

Backup And Restore Operations

- The configuration files is saved as files.

- The workspaces (and node version histories) is exported using t to a specific workspace (SavingWorkspace) using ObjectPM or XmlPM. We would zip the directory, copy it and destroy the workspace.

- Other resources (custom node types and namespaces) are saved and serialized using Jackrabbit's internal xml node type serialization format (NodeTypeWriter and NodeTypeReader for instance).

- We would then zip everything in the working folder move it as a stream to RepositoryImpl.

Evolution

Here are some evolutions ideas, please feel free to comment there or on the ML. We plan to implement them soon.

Please contact Nicolas Toper (through the ML or this contact form) on any question/suggestion/idea on this project

BackupTool (last edited 2009-09-22 08:53:45 by bsl-rtr)