DB2 10.5 for Linux, UNIX, and Windows

Backing up databases before or after upgrade

Before and after the upgrade process to DB2® Version 10.5, it is strongly recommended that you perform a full offline database backup. If an error occurs during the upgrade process, you need full database backups to recover and upgrade your databases.

After you upgrade your instances to DB2 Version 10.5, you cannot backup databases until you upgrade them.

Before you begin

Procedure

To perform a full offline back up for each of your local databases:

  1. Disconnect all applications and users from the database. To get a list of all database connections for the current instance, issue the LIST APPLICATIONS command:
    db2 LIST APPLICATIONS
    If all applications are disconnected, this command returns the following message:
    SQL1611W No data was returned by the Database System Monitor.
    SQLSTATE=00000
    To disconnect all applications and users, use the FORCE APPLICATION command:
    db2 FORCE APPLICATION ALL
  2. Backup your database using the BACKUP DATABASE command. In a DB2 pureScale® environment, you can run the BACKUP DATABASE command from any member. The following is an example for UNIX operating systems:
       db2 BACKUP DATABASE database_alias USER username USING password TO backup-dir
    where database_alias is the database alias, the user name is username, the password is password, and the directory to create back up files is backup-dir.

    In partitioned database environments, back up all database partitions.

    If you activated and configured DB2 Advanced Copy Services (ACS) on your databases in DB2 Version 9.7 or later, you can use the USE SNAPSHOT parameter to perform a snapshot backup. However, you can only restore a snapshot backup to an instance of the same version. You cannot use snapshot backup to upgrade to a new server. For details, see Performing a snapshot backup.

    If you performed a full online or offline database backup recently and you cannot perform another one before upgrading, you can perform an incremental offline database backup instead

  3. Optional: Test the integrity of a backup image to ensure that the image can be restored using the db2ckbkp command. The following command is an example on UNIX operating systems:
       cd backup-dir   
       db2ckbkp SAMPLE.0.arada.NODE0000.CATN0000.20091014114322.001
    
       [1] Buffers processed:  #######
    
       Image Verification Complete - successful.