Restore and roll forward through a topology change
A topology change involves adding or dropping members from a Db2 pureScale® instance,
either explicitly by running a db2iupdt operation or through a restore operation.
Certain conditions need to exist before restoring a backup image and successfully rolling-forward
when there is a topology difference between the source image and target instance.
Conditions for successful restore operations when topologies are different
If a backup image is being restored to the instance from which it was taken, but the instance has undergone a topology change, you can still restore into the target instance. You just need to have a common pureScale member in both your backup image and your target instance. You can also restore into a different instance.
To run a rollforward operation, followed by a restore operation, all of the members in the source topology must exist in the target topology.
When rolling forward is not supported, the restore operation must be done by using an offline backup image with the WITHOUT ROLLING FORWARD option. An online backup image is not supported in these cases because the option cannot be specified with an online backup image. Alternatively, restore and rollforward can be done on another instance that has all of the members from the source topology.
| Scenario | Example source topology | Example target topology | Restore supported | Rollforward supported |
|---|---|---|---|---|
| Target topology has members that are not in the source image. | Two-member pureScale (member 0, 1) | Three-member pureScale (member 0, 1, 2) | Yes | Yes |
| Target topology is missing members that are in the source image. | Three-member pureScale (member 0, 1, 2) | Two-member pureScale (member 0, 1) | Yes, but must be an offline image with the WITHOUT ROLLING FORWARD option set. | No |
| Target topology has members that are not in the source image and is missing members that are in the source image. | Three-member pureScale (member 0, 1, 2) | Three-member pureScale(member 0, 3, 4) | Yes, but must be an offline image with the WITHOUT ROLLING FORWARD option set. | No |
| No common member exists between the source image and the target instance. | Two-member pureScale (member 0, 1) | Two-member pureScale (member 2, 3) | No | No |
Once the database is activated after recovery, the database topology is the same as the instance topology.
Example 1 - Restore and rollforward through an add member event
db2 backup database sample to /dev3/backupdb2iupdt command to
process transactions on member 0, while adding member 1 to the source Db2
pureScale
instance:db2iupdt -m -adddb2 restore database sample from /dev3/backupdb2 rollforward database sample to end of logs and stopThe Db2 pureScale database is usable on the target instance, with members 0 and 1.
Example 2 - Restore and rollforward into an instance with more members
db2 backup database sample to /dev3/backupdb2 restore database sample from /dev3/backupThe following example
shows the command syntax for completing the rollforward operation:
db2 rollforward database sample and stop The Db2
pureScale database is
usable on the target instance, with members 0 and 1. Member 1 is added when a CONNECT command is
issued from the member, or when an ACTIVATE DATABASE command is run.Example 3 - Error scenario - Restore an online image to a target instance with fewer members than the source instance
db2 backup database sample to /dev3/backup onlineThe following example shows the command syntax for restoring the backup image, B0, to a target Db2 pureScale instance that has just one member, 0.
db2 restore database sample from /dev3/backup
SQL1564N The restore or rollforward operation did not complete successfully
because the specified operation is not supported. Reason code "5".SQL1564N The restore or rollforward operation did not complete successfully because the specified operation is not supported.To
restore using this backup image, the target instance must contain member 0 and 1.SQL2537N Roll-forward is required following the Restore.