Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ for DB2 Administrator's Guide
  3. Performing backups and restores of DB2
  4. About an alternate restore
  5. Performing the alternate restore on the clients
Veritas NetBackup™ for DB2 Administrator's Guide

Performing the alternate restore on the clients

The following procedures explain how to restore a DB2 database and its transaction logs. The procedure builds a request to DB2 to find the backup images that correspond to the database you try to restore. Type the commands in this procedure from the client that receives the restored database.

To perform an alternate restore of a DB2 database

  1. Modify the db2.conf file on the destination client.

    Add the following definitions:

    • One to specify the alternate restore

    • One to define the new database

    • One to define the old database

    • One to define the new log files

    • One to define the old log files

    The following example shows the definition that is needed to specify the alternate restore:

    OBJECTTYPE ALTERNATE # Specifies an alternate restore
    SRCINST db2v832d     # Names the source instance that was backed up
    SRCALIAS SAMPLE      # Names the source database that was backed up
    DESTINST db2v832t    # Names the destination instance name
    DESTALIAS NEWSAMPL   # Names the destination database alias name
    ENDOPER              # Ends the object definition

    The following example shows the definition that is needed to define the new database:

    DATABASE NEWSAMPL
    OBJECTTYPE DATABASE
    POLICY db2-bkup
    SCHEDULE Default-Application-Backup
    CLIENT_NAME Client1       # Restore to (and backup from) local host
    ENDOPER

    The following example shows the definition that is needed to define the old database:

    DATABASE SAMPLE
    OBJECTTYPE DATABASE
    POLICY db2-bkup
    SCHEDULE Default-Application-Backup
    CLIENT_NAME Client2       # Restore from backup of remote host
    ENDOPER

    The following example shows the definition that is needed to define the new archive log files:

    DATABASE NEWSAMPL
    OBJECTTYPE ARCHIVE
    POLICY db2_archive
    SCHEDULE Default-Application-Backup
    #SCHEDULE User            # Swap '#' on SCHEDULE for user-exit
    CLIENT_NAME Client1       # Restore to (and backup from) local host
    ARCFUNC SAVE 
    ENDOPER

    The following example shows the definition that is needed to define the old archive log files:

    DATABASE SAMPLE
    OBJECTTYPE ARCHIVE
    POLICY db2_archive
    SCHEDULE Default-Application-Backup
    #SCHEDULE User            # Swap '#' on SCHEDULE for user-exit
    CLIENT_NAME Client2       # Restore from backup of remote host
    ARCFUNC SAVE
    ENDOPER

  2. On the destination client, type the DB2 RESTORE command.

    Type this command in the following format:

    db2 restore db db_being_restored load lib_path into 
    new_db_name redirect
    

    Where:

    db_being_restored

    Specify the name of the database that was backed up.

    lib_path

    Specify the full path to the NetBackup library.

    new_db_name

    Specify the name for the new database. If the name of the new database matches the name of a database presently included in the new instance, the new database overwrites the existing database.

    For example:

    Windows:

    db2 restore db sample load install_path\NetBackup\bin\nbdb2.dll 
       into newsampl redirect

    UNIX:

    db2 restore db sample load /usr/openv/netbackup/bin/nbdb2.sl 
       into newsampl redirect
  3. Set the location of the data files for the tablespace.

    Type this command in the following format:

    db2 set tablespace containers for 0 using "(path path)"
    

    Where path specifies the DB2 install path.

    For example, type one or more commands similar to the following:

    Windows:

    db2 set tablespace containers for 0 using "(path 
    DB2_install_path\db2v832t\NODE0000\SQL00001\SQLT0000.0)"

    UNIX:

    db2 set tablespace containers for 0 using "(path 
    DB2_install_path/db2v832t/NODE0000/SQL00001/SQLT0000.0)"
  4. Restore the database.

    Type the RESTORE command in the following format:

    db2 restore db db_being_restored continue

    For example:

    db2 restore db sample continue
  5. (Optional) Restore the transaction logs.

  6. Use the DB2 ROLLFORWARD command to restore the logs.

    Type this command in the following format:

    db2 rollforward db new_db_name to end of logs and stop

More Information

Restoring the transaction logs

About an alternate restore

Preparing the master server for an alternate restore

Restoring the transaction logs

Performing a database restore

NetBackup for DB2 backup overview

Feedback

Was this page helpful?
Previous

Preparing the master server for an alternate restore

Next

Restoring the transaction logs

Feedback

Was this page helpful?