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.

Standard usage is:
loaddb.{bat,sh}
-Dlc.port=port# -Dlc.protocol=https -Dlc.host=fully-qualified-domain-name 
command
Example:
loaddb.bat
-Dlc.port=8443 -Dlc.protocol=https -Dlc.host=mycomputer.global.mycompany.com 
loadpub

The following table lists the available commands to use with the loaddb tool. The default command for the loaddb tool is UPGRADE.

CommandDescription
fix_auditsAdjusts the Content Delivery aggregated audit server.

If the CDs have the problem, the non-aggregated audits on the CDs can also be fixed by running the following:

loadb.bat -Dlc.audittype=local

genapiRecreates the API topics in the documentation folder from the current code-base. This will include any API documentation that has been updated in patches.
loadpacInstalls and uploads a documentation package. Creates a log file called loadpac.log in the ContentDelivery_home/logs directory.
loadpubUploads a publication from a directory of XML or data files. Creates a log file called loadpub.log in the ContentDelivery_home/logs directory.
loadtopicThe 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

  1. Waits for Content Delivery to be online.
  2. Logs in to Content Delivery in secure mode.
  3. Writes output to logs\loadtopic.log
  4. Calls the com.xyenterprise.xquery.lcutil.PrepareTopic java program to prepare a single topic for viewing.

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 upload_end&type=topic.

After all files are uploaded into the holding area, single topic prepare is invoked using web/pub.xql?action=prepare_topic with the &publish argument, if provided. If the action succeeds, the publication in its selected language is made visible.

loadtopic -Dlc.pubname=MP330-v1 -Dlc.publang=en
-Dlc.pubdir=single_topic -Dlc.publish=all
optimizeDefragments 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.

ADDCONFIGSets a global configuration value. This allows an administrator to change some of the global configuration values.
  • -Dlc.config.name is the global configuration name.
  • -Dlc.config.value is the global configuration value.
AUDITEXTRACTExtracts the audit XML files from the Content Delivery database to the ContentDelivery_home/extract/audits directory.
BACKUPCreates a backup of the Content Delivery database.
Usage:
loaddb.bat -Dlc.file=mybackup -Dlc.db=Y BACKUP
This command supports these options:
  • -Dlc.file=mybackup specifies the name of the saved backup ZIP file or folder. By default, the filename is full<datetime>.zip.

    If the argument to -Dlc.file= does not end in .zip, the backup will be saved to a folder, which is recommended when the size of the database being backed up exceeds 8G. When you decide to save to a folder, you need to set the following: -Dlc.zip=no. This is because the default value of -Dlc.zip is yes, which means that a zip file would be created even if it is saved to a folder.

  • -Dlc.db=Y specifies the database collection for the backup. By default, the collection is /db, which specifies the entire database.
CHECKDBRuns 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.

This command supports these options:
  • Specifying -Dlc.backup=yes creates a backup of the original database after running consistency checking. By default, no backup is created.
  • Specifying -Dlc.zip=no creates a backup of the original database to a folder rather than to a zip file. The default is yes.
  • Specifying -Dlc.zip_max=number_of_zip_files limits the maximum number of ZIP files that are created for the backup. By default, the maximum number of backup files is five. This is valid only when lc.backup=yes
DELETECONFIGDeletes a global configuration value. This allows an administrator to delete a global configuration value.

-Dlc.config.name is the global configuration name.

INSTALLRe-installs the database and removes all references to publications. Creates a log file called INSTALL.log in the ContentDelivery_home/logs directory.
PATCHLoads a single file into the Content Delivery database. File is loaded from the ContentDelivery_home/db folder. Supports the -Dpatch.dir and -Dpatch.file arguments.
RESTORERestores a backup of the Content Delivery database.
This command supports these options:
  • -Dlc.file="filename" specifies the name of the backup ZIP or folder file. By default, the filename is full<datetime>.zip.
  • -Dlc.pswd="admin_password" specifies the local administrator password. By default, no password is specified.
UNPROXYRemoves a proxy setting (proxy.url) from a Content Delivery installation.
UPGRADEUpgrades the database with the latest set of files from the db folder.

Typically, UPGRADE is used to update the skin files. Specifying this command creates a log file called UPGRADE.log in the ContentDelivery_home/logs. This is the default command.

The following table lists the available options to use with the loaddb tool.

OptionUse with CommandDescription
-Dlc.dbBACKUP

The specified the starting-point collection inside the database that you want to act on.

Example:

loaddb
-Dlc.db=/db/LiveContent/config -Dlc.zip=yes -Dlc.backup=yes
CHECKDB
The full *.zip file will be a back up of
/db/LiveContent/config
collection (and all of its sub collections, if any exist).
If you do not specify -Dlc.db, it defaults to
/db
, which is the whole database.
-Dlc.contextAllWeb application context, used to form the application URL. The default is derived from local configuration, usually /ContentDelivery
-Dlc.fileBACKUP, RESTOREName of a backup ZIP files to create during a backup, or load during a RESTORE.
-Dlc.filterloadpubFilename of the XML resource to use as the filter file for the publication.
-Dlc.hostAllHost name of the Content Delivery instance in which to connect. The default is localhost. Install a certificate to JAVA directly with all options.
-Dlc.installloadpubSet to true to make the publication visible. If set to false the publication's visible value will not be changed. The default is false.
-Dlc.packageloadpacName of a package file (.pac) or path to a directory that contains multiple .pac files.
-Dlc.portAllPort number to connect to. The default is derived from the local configuration.
-Dlc.protocolAllThe 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.
-Dlc.pswdRESTORE-Dlc.pswd="admin_password" specifies the local administrator password. By default, no password is specified.
-Dlc.pubdirloadpub

Directory where data is located to upload to the database.

To specify multiple input directories, separate the list by commas, for example:
-Dlc.pubdir=documentation,samples/DITA
-Dlc.publangloadpubPublication language. The default is en.
-Dlc.pubnameloadpub

Name of the publication.

-Dlc.tempdirBACKUP, CONSISTENCY_CHECKLocation for temporary files created during a backup.
-Dlc.tocloadpubFilename of the XML resource to use as the publication's top level TOC. This file must exist in the directories specificed by the -Dlc.pubdir argument.
-Dlc.zipBACKUP, CHECKDBSpecifying -Dlc.zip=no creates a backup of the original database to a folder rather than to a zip file. The default is yes.
-Dpatch.dirAll-Dpatch.dir=folder specifies the folder from which to load the patched file. This folder must start with db/ and is always local to the db/ folder.
-Dpatch.fileAll-Dpatch.file=file specifies the file to load into the XML database, which is located in the folder denoted by -Dpatch.dir