Jackrabbit-clone-scripts is a project mainly written in Shell, it's free.
Easily clone a jackrabbit instance for adding it to a cluster (or backup purposes)
Two scripts for helping adding new instances to a Jackrabbit cluster:
See also this blog-post for more details: http://blog.liip.ch/archive/2011/05/10/add-new-instances-to-your-jackrabbit-cluster-the-non-time-consuming-way.html
It needs xsltproc to adjust repository.xml (I don't like using regex for manipulating XML files)
It also needs the mysql client binary and rsync for doing a fast backup (when you do this daily and always backup in the same directory, this should help in cloning the indexes fast)
Both are easily replaceable by your preferred way of talking to the DB or copying whole directories.
Copy config.sh-dist to config.sh and adjust your preferences. Important options are
this is the directory where your repository.xml is and all the workspace directory (like indexes)
This is the name of your new cluster node. Make sure, this is unique (but the script will complain, if it exists already in the databas)
First make a backup of your current running repository with
bash cloneRepo.sh
Then copy the directory $REPOLOCATION.bkup to the server you want to start a new instance (or if you want to use it just for backup purposes, move it away to some secure location)
The scripts writes the current revision ID into a file called current_revision_id.dat. This is needed later for starting a new clone.
Then on the new server, call
bash startNewRepo.sh
and you're done.
The scripts are not really tested in production (yet) and handle one specific setup (you use MySQL as Persistent Store for example), but it should be easy to adjust it to your needs.
It has some tests for avoiding mistakes and the scripts stops then, but I'm sure I missed some not-so-obvious ones