Documentation Center

Restoring a database using loaddb RESTORE

This procedure restores your Content Delivery database. Backups can be restored to another system, even if the system that you restore the backup to has a different operating system than the computer on which the backup was created. The RESTORE command outperforms other ways of restoring the database, especially if the database is large.

Before you begin

Content Delivery will be unavailable for the duration of the execution.

If the backup you intend to restore includes user information and credentials (that is, if it contains a backup of the folder /db/system/), you must know the admin password at the time the database was backed up, because the restore will also restore that password.

About this task

The RESTORE command only restores the Content Delivery database. The following files are not part of the database, and are therefore not restored by this task:
  • conf.xml
  • lc.properties
  • log4j.xml
  • LiveContent*.xml files

If you have modified any or all of these files, you must back up and restore them separately.

Procedure

  1. Make sure that no end users are using Content Delivery during the restore process.
  2. Make sure that any virus scanner you have running ignores the folder where your database will be restored:
    • If you use your own Web application server (non-bundled setup), the database is restored to the data subdirectory of the WEB-INF subdirectory of the SDL Knowledge Center home directory.

    • If SDL provided the Web application server, the database is restored to data subdirectory of the SDL Knowledge Center home directory.

  3. At a command prompt, in the directory where Content Delivery is installed, type one of the following (without pressing Enter):
    • On a Windows machine, type loaddb.bat
    • On a Unix machine, type loaddb.sh
  4. Specify one or more of the following switches, as needed (again without pressing Enter):
    Switch and valueDescriptionDefault if omitted
    -Dlc.file="FILENAME"The path to, and name of, the ZIP file that contains the backed-up databasebackup.zip
    -Dlc.host=HOSTNAMEThe host name of the Content Delivery instance to connect to. When using this parameter to migrate from one server to another, make sure that each server within the secure group shares the same lc_auth_seed value in its lc.properties file.localhost
    -Dlc.port=PORTNUMBERThe port to connect to.8080
    -Dlc.context=CONTEXTThe specific application context in which Content Delivery runs (must start with a /)./ContentDelivery
    -Dlc.protocol=HTTPSAdd this switch if you connect to Content Delivery over a secure HTTPS connection.HTTP
  5. After the batch file name and your switches (if any), add the word RESTORE and press Enter.
    The database is restored, and a log file with a filename report-YYYYMMDD-HHMM.log, with YYYYMMDD-HHMM as a timestamp of the log, is produced. The log file is located in the WEB-INF/logs/ subdirectory of your SDL Knowledge Center home directory if you use your own Web application server, or in the logs/ subdirectory if you do not.
  6. Specify a new admin password. The RESTORE operation resets the admin password to default.
  7. If you use Content Delivery in combination with Apache Tomcat and, for whatever reason, Tomcat stops during the restore process, abort the restore process, restart Tomcat and start the restore process again.

Example

Example:
loaddb.bat -Dlc.file="myBackup1.zip" RESTORE