restore

The restore command initiates an offline restore of all database files from the backup directory specified by using the backupDir argument and performs a roll-forward recovery unless recovery is disabled by the optional noRecovery argument.

Information or errors from the restore operation are recorded in the recovery.log file located in the directory specified in the ActivityLogDirectory parameter in the [PersistentDb] section of the JADE initialization file.

If errors are encountered during the restore and recover process, you will not be able to use the database.

The syntax of the restore command in the jdbutilb command line is as follows.

jdbutilb path=database-path
         ini=initialization-file-name
         restore
         backupDir=backup-directory
         [recoverTo=date time|lastJournal=journal-file-number
                    |lastSerialNumber=audit-record-number]
         [noRecovery]
         [clearFilePaths]
         [clearSDSRole]
         [excludeFrozenFiles]
         [excludeFrozenPartitions]
         [verify]
         [nostatus]

The following example shows the use of the restore command in the jdbutilb command line to restore all files from the last backup made to the c:\jade\backup03092001 directory and recover committed transactions up to 8:41am on 14 July 2011.

jdbutilb path=d:\jade\newdb ini=d:\jade\jade.ini restore backupDir=e:\jade\backup03092001 
recoverTo=14\07\2011 08:41:09 verify nostatus

In this example, the database control file (_control.dat) and all database files that do not have specified explicit directories are restored to the d:\jade\newdb directory, regardless of the default database directory from which the files were backed up. Any files that have explicit directories in the database control file are restored to those locations.

You must specify in the path argument a directory that is valid on the server.

When recovery of all committed transactions up to a specified date and time are specified, any transactions that completed after that date and time are not reapplied. For more details, see "Restoring and Recovering the Database" and "Using the Restore Database Command", elsewhere in this document.