Loaddb Reference
The loaddb tool lets you interact with the database to perform various tasks, such as backing up the database or uploading content. This reference lists the commands to perform these tasks.
The loaddb tool can be run from the command line console when it is opened from the WEB-INF directory.
loaddb.{bat,sh}
-Dlc.port=port# -Dlc.protocol=https -Dlc.host=fully-qualified-domain-name
command
loaddb.bat
-Dlc.port=8443 -Dlc.protocol=https -Dlc.host=lc.example.com
loadpub lc.example.com, where lc refers to an example server dedicated to output.
The following table lists the most usual commands used with the loaddb tool. These commands cover most of the needs for database operations with Legacy Content Delivery . The default command for the loaddb tool is UPGRADE.
| Command | Description | Options specific to the command |
|---|---|---|
| BACKUP | Creates a backup of the Legacy Content Delivery database. By default it creates a backup of the entire database as a .zip file located in the WEB-INF repository
Example with options:
|
|
| RESTORE | Restores a backup of the Legacy Content Delivery database. By default, loaddb will restore the standard backup file stored in the WEB-INF repository. |
|
| UPGRADE | Upgrades the database with the latest set of files from the db folder, usually for a skin files update. It always upgrades with the entire content of the folder. Specifying this command creates a log file called UPGRADE.log in the ContentDelivery_home/logs. | No specific option. |
| CHECKDB | Runs a manual database consistency checking, rather than having to wait for the scheduled backup. The backup configuration in conf.xml supports scheduled backups with database consistency checking. However, running the loaddb BACKUP command does not perform database consistency checking. |
|
| FIX-PERMISSIONS | Restores the permissions that were valid before a database upgrade. This command is used whenever Legacy Content Delivery is upgraded to a new version. | No specific option. |
| SKINS-RESTORE | Restores the default skins as they were just after installation, if you had modified them afterwards. This command is typically used after an upgrade of Legacy Content Delivery to a new version. | No specific option. |
| INITGRAPH | Creates a graph for every publication in the Legacy Content Delivery database. | No specific option. |
The following table lists the options that can be used with all the commands.
| Name | Description |
|---|---|
| -Dlc.context | Web application context, used to form the application URL. The default is derived from local configuration, usually /ContentDelivery
|
| -Dlc.host | Host name of the Legacy Content Delivery instance in which to connect. The default is localhost. Install a certificate to JAVA directly with all options.
|
| -Dlc.port | Port number to connect to. The default is derived from the local configuration. |
| -Dlc.protocol | The network protocol to use for the connection. Should be either http or https. The default is http. Install a certificate to JAVA directly with all options. |
| -jh | Helper option used when you need to explicitly point to a java location other than JAVA_HOME, or if JAVA_HOME is not set.
|
The following table lists unusual commands used with the loaddb tool. These commands are used in very specific cases and will likely be absent from most used command set.
| Command | Description | Options specific to the command |
|---|---|---|
| ADDCONFIG | Sets a global configuration value. This allows an administrator to change some of the global configuration values. |
|
| client | Launches the eXistDB client tool. This tool can be used to
| No specific option. |
| DELETECONFIG | Deletes a global configuration value. This allows an administrator to delete a global configuration value.
|
|
| INSTALL | Re-installs the database and removes all references to publications. Creates a log file called INSTALL.log in the ContentDelivery_home/logs directory.
| No specific option. |
| loadpac | Installs and uploads a documentation package. Creates a log file called loadpac.log in the ContentDelivery_home/logs directory. |
|
| loadpub | Uploads a publication from a directory of XML or data files. Creates a log file called loadpub.log in the ContentDelivery_home/logs directory. |
|
| loadtopic | The loadtopic option is used for topic upload or prepare. The target will upload topic files from a folder, and then do a single topic prepare.
Loaddb with the loadtopic option
All files in the single_topic folder are first uploaded using web/pub.xql?action=upload_start&type=topic, upload_resource&type=topic, followed by After all files are uploaded into the holding area, single topic prepare is invoked using web/pub.xql?action=prepare_topic with the
| No specific option. |
| optimize | Defragments the Lucene index. As you load and delete publications over time, the Lucene index can become fragmented. Defragmenting the Lucene index can improve performance and reduce memory consumption during search operations. | No specific option. |
| PATCH | Loads a single file into the Legacy Content Delivery database. File is loaded from the ContentDelivery_home/db folder. |
|
| UNPROXY | Removes a proxy setting (proxy.url) from a Legacy Content Delivery installation.
| No specific option. |