Backing up databases before or after upgrade
For recoverable databases, a database upgrade can be a recoverable operation. Depending on your environment and upgrade window, it can be possible to take advantage of this recoverability feature to reduce your overall upgrade time and minimize your downtime.
This can impact your need for taking an offline database backup before and after the database upgrade. You must review Recovering through a DB2 server upgrade to see whether this is acceptable for the databases in your environment.
If your recovery plan for database upgrade will make use of roll forward through database upgrade, then before the upgrade process to Db2 version 11.5, it is suggested that you perform an online database backup to reduce the recovery time in case of failure with the upgrade procedure.
If you have a recent backup image available for use that is sufficient as well. Regardless, verify by using db2ckbkp that a good backup image exists and ensure all log files needed to recover from the identified backup image exist and are valid by using db2cklog. If your recovery plan for database upgrade will make use of roll forward through database upgrade, then after the upgrade process to Db2 version 11.5, it is recommended that you perform a full online database backup at your earliest convenience. A backup post-upgrade reduces the recovery time and simplifies the recovery procedure in case of failures.
- Online database backup images can only be restored to the Db2 Version where they were created. If you intend to restore the backup image to Db2 version 11.5 then it must be an offline database backup image.
- After you upgrade your instances to Db2 version 11.5, you cannot back up databases until you upgrade them.
- If users want to create incremental backups of the upgraded database, a full database backup is required following the database upgrade. This serves as the new starting point for the incremental backups.
Before you begin
- To back up a database, you require SYSADM, SYSCTRL, or SYSMAINT authority.
- Databases must be cataloged. To view a list of all the cataloged
databases in the current instance, enter the following command as an instance user:
db2 LIST DATABASE DIRECTORY
Procedure
To perform a full offline back up for each of your local databases: