XebiaLabs | Continuous Delivery and Agile DevOps Tools

XebiaLabs Blog

Subscribe to XebiaLabs Blog: eMailAlertsEmail Alerts
Get XebiaLabs Blog via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Intel XML, XML Magazine

Blog Feed Post

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 deployit-repository-migration-4.0.0-1-distribution.zip.
  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!

The post How To Migrate XL Release Or XL Deploy Repository To Another Database appeared first on XebiaLabs.

Read the original blog entry...

More Stories By XebiaLabs Blog

XebiaLabs is the technology leader for automation software for DevOps and Continuous Delivery. It focuses on helping companies accelerate the delivery of new software in the most efficient manner. Its products are simple to use, quick to implement, and provide robust enterprise technology.