eXist Reference

Below you will sections about eXist database and information of procedures you may wish to implement. Advise if your using eXist bundled inside your web application to move it out to another directory.


eXist is a native XML database used by the registry to store its metadata in a xml format and to peform XQuery operations to retrieve the metadata. You can find all the information about exist here. Below you will find sections about information about eXist and how it works with the Registry.

eXist embedded (Moving your Data Out)

By default eXist is embedded into the registry web application meaning you don't have to download it or setup any settings. The Registry already has all the necessary libraries to run eXist. The default of the registry though puts all the information (XML data storage) inside the webapp and this in general is not good and is recommended to change because of upgrading or undeploying of the registry would lose the data. You could of course make backups of the data directory and after doing an upgrade or deploy simply copy back over the data directory and restart your servlet/j2ee container. But there is a easier way to make settings use a different directory to store your data:

Making backups and upgrades

We thought this deserved a special section to make attention to this small fact. eXist stores all its information in a directory called "data". In embed mode you will find it in the {context name}/WEB-INF/data (if you did not move the data directory out (see above)). In external it is the same $EXIST_HOME/webapp/WEB-INF/data. It can sometimes be advisable to make a backup of this directory ever now and then. No matter how badly something happens to eXist restoring this directory will put everything correct again. To make backups of the xml files which is also good you can do this in a number of ways.
  1. commandline. You will find a backupandrestore.{sh/bat} scripts bundled for embedded eXist located in WEB-INF. Or found here: Info For embedded users the -ouri parameter will be xmldb:exist://{server}:{port}/{registry context}/xmlrpc
  2. eXist provides a client GUI to allow you to do many things internally to your db including backups and restores. You should be able to click on the 'Launch' button located at eXist

Installing eXist externally

You may for your own reasons want to install eXist straight from eXist website at http://exist.sourceforge.net. The download file is on the home page of eXist and see the quickstart guide for other info on installing such as on headless systems. Once installed here are some things to be customized for the astrogrid registry: