Restoring the database using the command line

You can use the command line to restore your backup of the IBM Spectrum Control database.

About this task

Restriction: Do not restore the IBM Spectrum Control database backup from one version of IBM Spectrum Control into another version. For example, do not restore a backup from IBM Spectrum Control 5.3.4 into 5.3.7, or any other.

Procedure

  1. Stop the IBM Spectrum Control services.
  2. Complete these steps to initialize the Db2® environment:
    1. While you are logged in to the Windows operating system as an Administrator, from the Windows Start menu, select IBM DB2 DB2COPY1 (Default) > DB2 Command Window - Administrator.
    2. While you are logged in to the Linux® or AIX® operating system as the root user, switch to the user that is the Db2 instance owner (for example, db2inst1)
  3. In the Db2 environment, run the following commands to prevent all users and applications from accessing Db2:
    db2 force application all
    db2 terminate
    db2 list applications
  4. In the Db2 environment, run the following command to restore your backup of the IBM Spectrum Control database:
    DB2 RESTORE DATABASE TPCDB FROM location INTO TPCDB REPLACE EXISTING

    where location is the directory where you stored the backup.

    Examples:
    • Windows operating system: DB2 RESTORE DATABASE TPCDB FROM C:\DB_Backup INTO TPCDB REPLACE EXISTING
    • Linux and AIX operating systems: DB2 RESTORE DATABASE TPCDB FROM /tmp/DB_Backup INTO TPCDB REPLACE EXISTING
  5. Restart the IBM Spectrum Control services.