Back Up and Restore SPD Server Table Indexes Using System Full Backups

Overview of Backing Up and Restoring SPD Server Table Indexes Using System Full Backups

Restoring indexes from system full backups and restores is not as clean as restoring indexes from SPD Server full backups and restores. To understand why, consider the two methods that you can use to restore indexes from a system full backup:
How do you decide which method to use? You must balance the time and resources that are needed to back up the index against the time needed to re-create the index when the table is restored.

Restoring the Index Dynamically

To restore the index dynamically, you must include the table index files in the full backup and restore of the table. To determine which index files to include, use spdsls with the -i index option. The output lists component files for each table in the domain that is to be fully backed up.
When you restore a table, you must first restore the table metadata, data, and index files from the last full backup archive. Then use spdsrstr to perform incremental restores. As the tables are restored, the indexes are dynamically updated to include any new or modified records.
This method trades the additional resources that are required for full backup of the table index files, which can be very large, against the potentially short time that might be required to restore them. You can restore indexes for a table that has not had any incremental changes after the system full backup by using a system full restore.

Re-creating the Index After the Table Is Restored

If you use this method, you do not need to include the index files in the full backup of the table. When you run spdsls to list the component files for each table in the domain that you intend to back up, omit the -i index option. The spdsls utility includes a list in the output that excludes index files.
Note: If you do not save index information, you can experience problems when you attempt to fully restore the table. The table's metadata contains information about the index files that might be missing or out of date. As a result, the metadata no longer mirrors the contents of the table.
Before you can perform an incremental restore of the table, you must first repair the table metadata. To repair the metadata, use PROC DATASETS to modify the table and delete all of the indexes, and then run spdsrstr to restore the table. After the table is restored, use PROC DATASETS again to modify the table and create the indexes.
This method trades the resources that you save by not fully backing up the index files against the greater amount of time it can take to re-create the indexes fully if the table must be restored.