Skip to main content
DevOps icon showing cogs

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

DevOps

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 https://github.com/xebialabs-community/xld-repository-migration.
  4. From the extracted directory, copy the bin/migrate.sh 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/migrate.sh -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
Ascension Launch Banner
Apr 26, 2022

Get ready for peak performance with Digital.ai’s newest AI-Powered DevOps Platform Ascension Release

DevOps
Today, Digital.ai is excited to announce our latest AI-Powered DevOps ...
Read More
Jan 24, 2022

Digital.ai Value Stream Delivery for SAFe®: The key to amazing business outcomes

DevOps
The Scaled Agile Framework (SAFe) is the world’s leading framework for ...
Read More
Dec 09, 2021

How SaaS and cloud-based solutions helped the U.S. Department of Veterans Affairs achieve digital transformation

DevOps
Modernizing legacy systems was an ongoing goal for the U.S. Department ...
Read More
Nov 29, 2021

Increase velocity and reduce risk with AI and machine learning

DevOps
Artificial Intelligence (AI) and machine learning (ML) have proven use ...
Read More
Contact Us