Resolve a failed restore

How you resolve a failed restore depends on the cause of the failure.

You can save some failed restores even if restartable restore is turned off. For example, if the restore fails because of a storage-manager or storage-device error, you can fix the tape drive or storage-manager problem, remount a tape, and then continue the restore.

The following table shows what results to expect when physical restore fails and the value of the BAR_RETRY configuration parameter is > 1.

Table 1. Failed physical restore scenarios
Type of error RESTARTABLE_ RESTORE setting What to do when the physical restore fails?
Database server, ON-Bar, or storage-manager error (database server is still running) ON or OFF ON-Bar tries each failed restore again. If the storage manager failed, fix the storage-manager error.

If the tried restore fails, issue onbar -r spaces where spaces is the list of storage spaces not yet restored. Use onstat -d to obtain the list of storage spaces that need to be restored. ON-Bar restores the level-0 backup of each storage space, then the level-1 and level-2 backups, if any.

ON-Bar or storage-manager error (database server is still running) ON Issue the onbar -RESTART command.

If the storage manager failed, fix the storage-manager error.

The restore restarts at the storage space and backup level where the first restore failed. If the level-0 backup of a storage space was successfully restored, the restarted restore skips the level-0 backup and restores the level-1 and level-2 backups, if any.

Database server failure ON or OFF Because the database server is down, perform a cold restore. Use onbar -r to restore the critical dbspaces and any noncritical spaces that were not restored the first time.
Database server failure ON Issue the onbar -RESTART command.

The restore restarts at the storage space and backup level where the first restore failed. If the level-0 backup of a storage space was successfully restored, the restarted restore skips the level-0 backup and restores the level-1 and level-2 backups, if any.

The following table shows what results to expect when logical restore fails.
Table 2. Failed logical restore scenarios
Type of error RESTARTABLE_ RESTORE setting What to do when a logical restore fails?
Database server or ON-Bar error in a cold restore (database server is still running) ON Issue the onbar -RESTART command.

The logical restore restarts at the last checkpoint. If this restore fails, shut down and restart the database server to initiate fast recovery of the logical logs. All logical logs not restored are lost.

Database server or ON-Bar error (database server is still running) ON or OFF Issue the onbar -r -l command. The restore restarts at the failed logical log.

If onbar -r -l still fails, shut down and restart the database server. The database server completes a fast recovery. All logical logs that were not restored are lost.

If fast recovery does not work, you must do a cold restore.

Database server error ON If the cold logical restore failed, issue onbar -RESTART.

If the warm logical restore failed, issue the onbar -r -l command. If that fails, restart the entire restore from the beginning.

Storage-manager error ON or OFF ON-Bar tries each failed logical restore again. If the tried restore fails, the logical restore is suspended. Fix the storage-manager error. Then issue the onbar -r -l command. The restore restarts at the failed logical log.