jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: BackupTool Main Class
Date Mon, 26 Jun 2006 09:47:08 GMT

On 6/26/06, Nicolas Toper <ntoper@gmail.com> wrote:
> OK for me, but this means I would access the repository only when Jackrabbit
> is shut down. Backup will be performed only in this case.
> What do you think?

I'd put the save/restore methods in RepositoryImpl (and later on
probably also in the JackrabbitRepository interface) and let the end
user decide how to call them.

We have a number of options that are each possible (even as a
combination) as long as the methods are exposed:

1) Command line client. Instantiates the repository and calls save()
or restore() on it. Requires that no other process has the repository

2) Configurable extension to jackrabbit-server. A separate servlet
that looks up the repository and calls save() (or restore()) based on
user input.

3) A JMX MBean instance that wraps an underlying RepositoryImpl. This
way there would be no JMX dependency in Jackrabbit core, but the
save()/restore() operations could still be operated remotely using the
standard JMX machinery (jconsole, etc.).

As a starting point I would add a simple main() method on the main
backup class that implements option 1. Something like (just a quick

    java o.a.j.backup.Backup save repository.xml repository/ > backup.zip
    java o.a.j.backup.Backup restore repository.xml repository/ < backup.zip


Jukka Zitting

Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

View raw message