About this task
There are three possible ways to back up a database in
a partitioned database environment:
- Back up each database partition one at a time using the BACKUP
DATABASE command, the BACKUP DATABASE command
with the ADMIN_CMD procedure, or the db2Backup API.
- Use the db2_all command
with the BACKUP DATABASE command to first back
up the catalog partition and then to back up a specified list of database
partitions.
- Run a single system
view (SSV) backup to back up some or all of the database partitions
simultaneously, including the catalog partition.
Backing up each database partition one at a time is time-consuming
and error-prone. Backing up all the partitions by using the db2_all command
is easier than backing up each database partition individually because
you generally only have to make one command call. However, when you
use db2_all to back up a partitioned database,
you sometimes still have to make multiple calls to db2_all because
the database partition containing the catalog can not be backed up
simultaneously with non-catalog database partitions. Whether you
back up each database partition one at a time or use db2_all,
managing backup images created using either of these methods is difficult
because the timestamp for each database partition's backup image will
be different, and coordinating the minimum recovery time across the
database partitions' backup images is difficult as well.
For the
previously mentioned reasons, the recommended way to back up a database
in a partitioned database environment is to use an SSV backup because
you can decide to back up all database partitions simultaneously,
including the catalog partition, and get the same timestamp for each
database partition backup. Alternatively, you can split your backup,
specifying some database partitions for which you get the same timestamp,
and later take additional backups on the other database partitions
to complete the database backup. The catalog partition can be backed
up at any time with any other database partitions.
Note: For restore
operations, you still need to restore the catalog partition before
restoring some or all of the other database partitions.
To back up some or all of the database partitions of
a partitioned database simultaneously using an SSV backup: