Documentation Center

Restoring a database using loaddb RESTORE

This procedure restores your Legacy 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

Legacy 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 Legacy 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 Legacy Content Delivery during the execution.
  2. Make sure that any virus scanner you have running ignores the folder where your database will be restored. The database is restored to the data subdirectory of the WEB-INF subdirectory of the SDL Tridion Docs home directory.
  3. At a command prompt, in the directory where Legacy 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 Legacy Content Delivery instance to connect to. When using this parameter to migrate from one server to another, ensure 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 Legacy Content Delivery runs (must start with a /)./ContentDelivery
    -Dlc.protocol=HTTPSAdd this switch if you connect to Legacy 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 Tridion Docs home directory.
  6. Specify a new admin password. The RESTORE operation resets the admin password to default.
  7. If you use Legacy 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