Previous Topic: Restore Auto-Archived Files

Next Topic: Manually Backing Up Archived Databases

Restore–Script for Restoring Archived Databases

You cannot query or report on data that resides in a cold database on a remote storage server. To query and report on such data, that data must reside in a warm state on a CA Enterprise Log Manager server. The restore shell script, restore-ca-elm.sh, is a command-line utility that moves a specified cold database and its digital signature to a specified CA Enterprise Log Manager server and restores it to a warm state. You can use the restore utility to move a database back to the original reporting server or to a dedicated restore point. Configuring non-interactive authentication is a prerequisite to running the restore script.

You run the restore script from the CA Enterprise Log Manager server to which you want to restore the files. The remote host you identify in the command refers to the remote storage server. Cold databases reside in the archive directory of the remote storage server.`

Requirements for restoring database files to either the original reporting server or a restore point server follow:

If restoring files to a restore point server, take the following additional actions:

  1. Copy the RSA key from the remote storage server to the restore point server
  2. Set the RSA key file ownership on the restore point server.

The command has the following format:

restore-ca-elm.sh -euser userid -epasswd pwd -rhost hostname -ruser userid -rlocation path -files file1,file2,file3...
-euser username

Specifies the user name of a CA Enterprise Log Manager user account with the Administrator role.

-epasswd pwd

Specifies the CA Enterprise Log Manager password associated with the user name.

-rhost host

Specifies the hostname or IP address of the remote host where cold database files reside in the archive directory. The remote host is not a CA Enterprise Log Manager server.

-ruser remote user

Specifies the user account with permissions to the /opt/CA/LogManager path and ownership of the .ssh folder containing the authorized keys file. Typically, this user account is the caelmservice user account.

-rlocation path

Specifies the path to the database files on the remote storage server. If the remote storage server is a UNIX server, the path is /opt/CA/LogManager/data/archive.

files file1,file2,file3...

Specifies a comma-separated list, without spaces, of the database files to restore.

Example: Restore Shell Script

The following example command is run from the CA Enterprise Log Manager to which the archived database files are to be restored. It is run by a user with account credentials of Administrator1, calm_r12. The remote server to which the archived databases have been moved from off-site storage is named NY-Storage-Svr. This remote server has been configured with a caelmservice account that has ownership of the .ssh folder where the RSA public key has been copied. This account also has full privileges on the directory structure /opt/CA/LogManager. This command specifies that the files to be restored are in the data/archive directory path of the NY‑Storage‑Svr server and identifies the database file to be restored as NY‑Storage‑Svr_20081206192014.db.cerod.

restore-ca-elm.sh -euser Administrator1 -epasswd calm_r12 -rhost NY‑Storage‑Svr -ruser caelmservice -rlocation /opt/CA/LogManager/data/archive -files NY‑Storage‑Svr_20081206192014.db.cerod

More information:

Restore Auto-Archived Files

Configuring Non-Interactive Authentication for Restore

Example: Configure Authentication From Remote Storage to a Restore Point

Example: Configure Authentication From a Storage Server to a Reporting Server