SQL/MP Installation and Management Guide
Planning Database Security and Recovery
HP NonStop SQL/MP Installation and Management Guide—523353-004
4-21
Backing Up Partitions
partitions of tables and indexes; the catalog tables themselves are not backed up
unless you also specify the SQLCATALOGS ON option.
By using the FROM CATALOG option for an SQL database, you can achieve a backup
of a catalog or list of catalogs. This clause can be useful in maintaining backups of
logical groupings of SQL objects as they are grouped in the catalogs.
You can use a DEFINE name for the catalog name.
This example uses a series of commands to perform a full backup on all files from
each catalog specified in the FROM CATALOG clause, with the files from each catalog
on a separate reel. In this example, audited objects would not be backed up because
the AUDIT option is omitted.
BACKUP $TAPE, ( *.*.* FROM CATALOG $VOL1.CAT1), LISTALL, OPEN
BACKUP $TAPE, ( *.*.* FROM CATALOG $VOL2.CAT2), LISTALL, OPEN
...
BACKUP $TAPE, ( *.*.* FROM CATALOG $VOL9.CAT9), LISTALL, OPEN
This command performs a full backup on all files from several catalogs specified in the
catalog list:
BACKUP $TAPE, (*.*.* FROM CATALOG ($VOL1.CAT1,$VOL2.CAT2, ...
$VOL9.CAT9)), LISTALL, OPEN
Backing Up Partitions
You can use the PARTONLY ON option when a database has partitioned tables.
PARTONLY enables you to back up and restore single components of a partitioned
database.
PARTONLY could be applicable in these situations:
•
A table partition resides on a remote node.
•
A particular volume with partitioned objects is archived individually.
•
A volume-mode backup is performed for archiving, and additional file-mode
archiving is needed for individual partitioned files.
You cannot use the PARTONLY option with the MAP NAMES option.
This example performs a full backup on each volume with the PARTONLY option:
BACKUP $TAPE, $SYSTEM.*.*, PARTONLY ON, OPEN, LISTALL
BACKUP $TAPE, $VOL1.*.*, PARTONLY ON, OPEN, LISTALL
...
BACKUP $TAPE, $VOL9.*.*, PARTONLY ON, OPEN, LISTALL
Caution. Use extreme caution when using PARTONLY in BACKUP and RESTORE operations
for partitioned files. It is possible to make the primary and secondary partitions of a file
inconsistent both with each other and with indexes.
For example, if you delete a table partition after a BACKUP PARTONLY operation, a RESTORE
PARTONLY operation would corrupt the table because the table no longer has that partition.