SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)

BACKUP provides a mechanism to perform a partial backup automatically on only those files that
have changed since the last backup date. You can filter certain objects, such as files with a specified
user ID, files created or modified within a certain timestamp expression, or files with a certain file
code. By using the WHERE expression, you can back up only SQL/MX files that have been modified
from a certain date.
If you perform partial backups, you must perform a full backup periodically to ensure that all files
have been saved.
This example uses a qualified file set list to restrict the backup to files that were modified since the
date of the last full backup:
BR> BACKUP $tape-drive, (MX((CATALOG*) WHERE (MODTIME AFTER 10 JAN
2004)));
Backup Objects Hierarchy
For more information about the SQL/MX object hierarchy supported by Backup and Restore 2,
see the Backup and Restore 2 Manual.
SQL/MX Objects Backed Up Explicitly
Backing Up Catalogs
SQL/MX catalogs are backed up only when specified, not by default. When you back up a catalog,
all of its subordinate objects (for example, schemas, tables, indexes, and sequence generators)
are backed up as well unless they are specifically excluded.
NOTE: Sequence generators cannot be specifically excluded.
You can specify the MX CATALOG backup object to back up one or more catalogs:
BR> BACKUP $tape-drive, MX CATALOG mycat1;
You can also use it to specify every catalog in the SQL/MX file system.
BR> BACKUP $tape-drive, MX CATALOG CAT*;
You can specify either CAT or CATALOG in the BACKUP command. The CAT * object specifier,
which directs BACKUP to back up every catalog and its subordinate objects, effectively backs up
every file in the SQL/MX file system.
Backing Up Schemas
When you back up a schema, all of its subordinate objects are backed up as well unless they are
specifically excluded.
You can back up one or more schemas, either implicitly, by backing up associated catalogs, or
explicitly, by identifying the SCHEMA backup object:
BR> BACKUP $tape-drive, MX SCHEMA mycat1.sch1;
BR> BACKUP $tape-drive, MX SCHEMA mycat1.sch1, mycat1.sch2;
Backing Up Tables and Partitions
When you back up a table, all its subordinate objects (for example, partitions) are backed up as
well unless they are specifically excluded.
You can back up one or more tables, either implicitly, by backing up associated schemas or
catalogs, or explicitly, by specifying the MX TABLE or MX TBL backup object:
BR> BACKUP $tape-drive, MX TABLE cat1.sch1.table1;
BR> BACKUP $tape-drive, MX TABLE cat1.sch1.table1,
cat1.sch1.table2;
64 Planning Database Security and Recovery