ontape utility syntax: Perform a restore

Use the -r option to perform a full physical and logical restore of the database server data with ontape. Use the -D option to restore selected storage spaces. Use the -rename option to rename chunks during the restore.

You must run the ontape command as the owner of the database server: user informix or root for a standard installation, or the owner of the non-root installation. The owner of the database server for the restore must be the same as the owner of the database server for the backup.

Read syntax diagramSkip visual syntax diagram
Run a full or physical restore

>>-ontape--+------------------------+--+- -r----------+--------->
           |                    (1) |  '- -p--+-----+-'   
           '-|  -FILE option  |-----'         '- -e-'     

>--+-----------+------------------------------------------------>
   +- -encrypt-+   
   '- -decrypt-'   

>--+----------------------------------------------------------------------------------+-->
   |             .----------------------------------------------------------------.   |   
   |             V                                                                |   |   
   '- -rename--+--- -p--old_path-- -o--old_offset-- -n--new_path-- -o--new_offset-+-+-'   
               '- -f--filename------------------------------------------------------'     

>--+------------------+--+--------------------+----------------><
   |      .---------. |  '- -t STDIO--+-----+-'   
   |      V         | |               '- -v-'     
   '- -D----dbspace-+-'                           

Notes:
  1. See The -FILE option.
Read syntax diagramSkip visual syntax diagram
Run a logical restore

>>-ontape--+- -l--+- -C-+-+------------------------------------><
           |      '- -X-' |   
           '- -S----------'   

Element Purpose Key considerations
-C Restores logs from the current logical log tape without sending prompts to mount the tape. The server is placed in suspend log restore state, and the command exits after the last applicable log is restored. The server sends a prompt if a log spans tapes.
-D Directs ontape to restore only the storage spaces you specify. The database server must go into online or quiescent mode to do a warm restore. When you use the -D option, you can restore selected storage spaces.

When you do not specify the -D option, ontape performs a full-system restore. The database server must go offline to do a full-system restore. For more information, see Restore selected storage spaces.

dbspace Is the name of a storage space to restore. You can specify multiple storage spaces, but you must include the root dbspace.
-decrypt Specifies to decrypt any encrypted storage spaces during the physical restore of the spaces.

For more information about storage space encryption, see Changing storage space encryption during a restore.

-e Directs ontape to perform an external restore For more information, see Perform an external backup and restore.

This option is compatible with renaming chunks for external cold restores.

-encrypt Specifies to encrypt storage spaces during the physical restore of the spaces. Storage space encryption must be enabled by the DISK_ENCRYPTION configuration parameter. Otherwise, storage spaces are not encrypted during the restore.

For more information about storage space encryption, see Changing storage space encryption during a restore.

-f filename Specifies a file containing the names and offsets of chunks to be renamed and their new locations. Use to rename many chunks at one time. The file name can be any valid UNIX or Windows file name, including simple (listfile_1), relative (../backup_lists/listfile_2 or ..\backup_lists\listfile2), and absolute (/usr/informix/backup_lists/listfile3 or c:\informix\backup_lists\listfile3) file names.

In the file, list the old chunk path name and offset and the new chunk path name and offset, with a blank space or a tab between each item. Put information for each chunk on a separate line. Blank lines are ignored. Begin comment lines with a # symbol.

-l Directs ontape to perform a logical restore. The -l option restores data from the logical-log backup tapes you created after (and including) your last level-0 backup.
-p Directs ontape to perform a physical data restore. The -p option restores data from the backup tape you created after (and including) your last level-0 backup. During the restore, the database server is in single-user mode.

-p old_path

-o old_offset-n new_path

-o new_offset

Specifies the chunk to be renamed and its new location. Use to rename one or more chunks at one time. The variables for this element are:
old_path
The current path and file name of the chunk.
old_offset
The current offset of the chunk, in kilobytes.
new_path
The new path and file name of the chunk.
new_offset
The new offset of the chunk.
-r Directs ontape to perform a data restore (both physical and logical). The -r option restores data from the backup tape and the logical-log backup tapes you created after (and including) your last level-0 backup.
-rename Directs ontape to rename the specified chunks. For more information about renaming chunks during a restore, see Rename chunks during a restore.
-S Directs ontape to perform a logical log salvage. If you want to salvage logical logs, you must use the -S option before performing a restore from standard input. The LTAPEDEV configuration parameter must be set to the logical log tape device.
-t STDIO Directs ontape to restore from standard input. The -t option overrides the value of the TAPEDEV configuration parameter for the current restore.
-v Directs ontape to write informational message to stderr during a restore from standard input. Verbose mode is useful for monitoring the progress of a restore from standard input.
-X Quiesces a server in logical restore suspend state without restoring additional logs. Include this option with -r -l to end continuous log restore of logical logs.