About this task
There are four ways to back up a database in a partitioned
database environment:
- Back up each database partition one at a time by 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.
- Use a task assistant in IBM® Data
Studio to
guide you through the process of backing up the database.
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 must make one command call. However, when you
use db2_all to back up a partitioned database,
you sometimes still must make multiple calls to db2_all because
the database partition that contains the catalog cannot 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 that were created using either of these methods
is difficult because the time stamp for each database partition's
backup image is 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 time stamp for each database partition backup. Alternatively,
you can split your backup, specifying some database partitions for
which you get the same time stamp, 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 must restore
the catalog partition before you restore some or all of the other
database partitions.
To back up some or all of the database partitions of
a partitioned database simultaneously by using an SSV backup: