Loading...

DB2 MultiNode Command Line Restores

You can use all DB2 commands in which the -lo (load option) is used. Refer to the IBM DB2 manuals for the complete list of DB2 commands that can include the optional -lo parameter.

Use the following steps to restore a database using the DB2 command line.

Note: For command line restores, disconnect all connected applications to the database before running the restore. Otherwise, the restore will fail.

If you run DB2 v10.5 FP8 or later, you must open an additional session when you perform a restore from an online backup.

Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.

DB2 DPF

  1. At the DB2 command prompt, type the appropriate restore command for the specific platform.
    • For a DB2 instance on 32-bit AIX/Solaris, or 32-bit or 64-bit Linux, or 31-bit/64-bit Linux on System Z, run the following command:

      Export DB2NODE=<n>
      Db2 terminate
      db2 restore db <database name> incremental automatic \
      load '<software install path>/Base/libDb2Sbt.so' \
      open <n> sessions \
      taken at <backup image date of DB2NODE n > \
      without prompting

    • For a DB2 instance on 64-bit AIX/Solaris or 64bit Linux on System Z, run the following command:

      db2 restore db <database name> incremental automatic \
      load '<software install path>/Base64/libDb2Sbt.so' \
      open <n> sessions \
      open <n> sessions taken at <backup image date of DB2NODE n > \
      without prompting

  2. Roll forward the DB2 database.

    Example DB2 DPF

    export DB2NODE=0
    db2 terminate
    db2 rollforward <database name> to end of logs on all nodes and stop

DB2 pureScale

  1. At the DB2 command prompt, type the restore command.

    db2 restore db <database name> \
    incremental automatic \
    load '<software install path>/Base/libDb2Sbt.so' \
    open <n> sessions \
    taken at <backup image date> \
    without prompting

  2. Roll forward the DB2 database.

    db2 rollforward db <database name> to end of logs and stop

Where:

<software install path> is the install path for the agent software (e.g., level1/install);

<backup image date> is the date of the backup image in the following format: ()"YYYYMMDDHHMMSS" (e.g., 20070612120426).

<n> is the number of streams, which should be equal to the number of backup streams

Last modified: 1/10/2020 2:14:06 PM