Sybase 12.4.2 manual Restore accommodates dbspace changes, 397

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 417
Image 417

CHAPTER 11 Backup and Data Recovery

For a full restore, the Catalog Store (by default the .db file) and the transaction log (by default the .log file) must not exist in the location you are restoring to. If either of these files exists, you must delete it or move it to a different directory before doing the full restore.

When a full restore begins, it destroys all old database files and then recreates them. The requirement that you manually delete the Catalog Store and transaction log files protects you from doing a full restore accidentally.

For any incremental restore, the Catalog Store ( .db) and transaction log (.log) files must exist. If they exist, but in a different location than the one you are restoring to, you must follow the procedure described in “Moving database files”. If either of these files does not exist, you can only do a full restore.

For any incremental restore, the database must not have changed since the last restore.

Restore requires exclusive access to the database. The default database server startup option -gd DBA guarantees that only the DBA can start a database. To ensure exclusive access, start the database server with the -gd DBA option set, but do not start the database you are restoring. RESTORE automatically starts the database in such a way that no other users can connect to it.

You must restore an entire backup or set of backups. Restoring individual files is not supported. However, you can move database files to a new location, using the RENAME clause of the RESTORE command.

Restore accommodates dbspace changes

During a set of incremental restores, RESTORE creates and drops dbspaces as needed to match what was done during the period of operation encompassed by the restores. For example, assume that you make a full backup of a database, then add a dbspace to that database, and then do an incremental backup after adding the dbspace. When you restore from these backups, RESTORE creates a file for the new dbspace, at the start of the incremental restore. Similarly, if you drop a dbspace, it is dropped during the restore, although the actual file is not removed.

397

Page 417
Image 417
Sybase 12.4.2 manual Restore accommodates dbspace changes, 397