Skip to main content
DevOps Image

This post is from the XebiaLabs blog and has not been updated since the original publish date.

Last Updated Apr 06, 2015 — DevOps Expert

How To Migrate XL Release Or XL Deploy Repository To Another Database


By default, XL Deploy and XL Release store data in an embedded Apache Derby database, but you can configure another type of database if you would like. You can read this XL Deploy manual or this XL Release manual to learn how. However, what if you already have existing data in your repository? Then, in addition to reconfiguring your repository, you must also migrate the data to the new repository. This article will tell you how. The procedure aims to do following:

  • Configure a new repository in the XL* installation directory
  • Execute a script that will copy the data from old repository to the new one
  • Reconfigure the XL* instance to point to the new repository
The directory where XL Deploy or XL Release instance is installed will be referred to as XL_HOME. These are specific steps you need to follow:
  1. Shut down the XL* instance cleanly. For XL Deploy, ensure that there are no running tasks before shutting down.
  2. Create a backup of the XL* instance configuration folder (XL_HOME/conf) and repository (XL_HOME/repository), including external database if you have it configured.
  3. Download and extract
  4. From the extracted directory, copy the bin/ script to the XL_HOME/bin folder and copy lib/repository-migration-4.0.0-1.jar to XL_HOME/plugins.
  5. In the same XL_HOME/bin folder, create a file called jackrabbit-repository.xml with the new repository configuration; for example, with an external database instead of Apache Derby, or with attachment files stored in a database instead of in the file system (see this example).
  6. Open a command line and go to the XL_HOME directory.
  7. Run the following command:
    sh bin/ -deployitHome ./ -jackrabbit-config-file ./bin/jackrabbit-repository.xml -repository-name repository-new -updateDeployitConfiguration
  8. Wait for the migration to complete.
  9. Start the XL* instance and verify that migration has completed successfully.
  10. To clean up the installation, restore the standard repository path and delete the copied files:
    1. Stop the XL* instance.
    2. Replace XL_HOME/repository with XL_HOME/repository-new.
    3. Restore the original repository location in configuration file by replacing the new configuration file with the one that you backed up (the end of the file name shows the timestamp): in the case of XL Deploy, XL_HOME/conf/deployit.conf, or in the case of XL Release, XL_HOME/conf/xl-release-server.conf.
    4. Delete XL_HOME/bin/migrate.shXL_HOME/bin/jackrabbit-repository.xml, and XL_HOME/plugins/repository-migration-4.0.0-1.jar.
Please be aware of the following.
  • The migration script does not provide progress information during the procedure.
  • The time the migration takes depends on the size of the repository and can range from minutes to hours. In our tests, a 1.2 GB repository running against a database on the same machine took approximately two hours to migrate.
  • The Lucene index of the XL Deploy or XL Release instance is not migrated and will be regenerated while the instance is starting. The time this takes also depends on the size of the repository; it is possible that it takes hours.
  • This guide was tested on XL Deploy 4.5.2 and XL Release 4.5.1. It is expected to work on other versions of these products as well, but we did not test it.
Happy migrating!

More from the Blog

View more
Mar 04, 2021

Getting key stakeholder buy-in for changes perceived as risky

Organizational leaders must recognize that change is vital for the sur ...
Read More
Mar 01, 2021

Discover the change management practices that are ripe for optimization

Change has become the most important part of modern digital product cr ...
Read More
Feb 22, 2021

Reckoning DevOps’ role in the enterprise value stream

If you’re a software or digital solutions company, you may use DevOps ...
Read More
Feb 10, 2021

Customer spotlight: Schneider avoiding bumps in the road with DevOps adoption

Everyone wants to deliver software faster and more reliably. Companies ...
Read More
Contact Us