infx restore type=full|physical|ext|logical|endlogical|warm|hot fork=no [ rename tapedev force=yes|no online=yes|no cont=yes|no salvage=yes|no dbspacelist source ]
notes
- see setup backup & restore manager for the mapping between restore types and commands
- the restore service may execute additional commands before and after the restore, depending on your config
- restores will not run unless the instance being restored is down, specify force=yes to force the instance done first
- instances in recovery mode after a restore, specify online=yes to override and bring the instance online
perform a complete restore
infx restore type=full [ rename tapedev force=yes|no online=yes|no ] fork=no
Completely restores the instance with all database backups and logical log transactions applied. The current transaction log
will be salvaged if possible before the restore. Once the restore completes, the instance will be in quiescent mode. Specify
online=yes to override this.
option
|
description
|
example |
| rename |
path to a file containing chunk rename mappings for onbar/ontape |
rename=/tmp/instrename |
| tapedev |
restore using this value for TAPEDEV, instead of ONCONFIG value |
tapedev=/backup/db |
| force |
specify force=yes to shutdown before restoring |
force=yes |
| online |
specify online=yes to set the instance to online mode |
online=yes |
notes
Consult the Informix Backup & Restore guide for what is required for a restore to be valid. In summary:
- Current ONCONFIG values must match the backup:
- ROOTPATH
- ROOTNAME
- ROOTOFFSET
- MIRROR
- Depending on the type of backup, these may also be required to match:
- TAPEBLK
- TAPESIZE
- LTAPEBLK
- LTAPESIZE
- Chunk files must be available for all chunks contained in the backup
perform physical restore only
infx restore type=physical [ rename tapedev force=yes|no salvage=yes|no online=yes|no ] fork=no
Separate the physical and logical restore processes, and only perform the physical portion. This leaves the database in a state
where you can now decide to apply more transaction logs, or start up HDR replication, or bring the instance online.
option
|
description
|
example |
| rename |
path to a file containing chunk rename mappings for onbar/ontape |
rename=/tmp/instrename |
| tapedev |
restore using this value for TAPEDEV, instead of ONCONFIG value |
tapedev=/backup/db |
| force |
specify force=yes to shutdown before restoring |
force=yes |
| salvage |
perform a salvage of the logical logs first, log is overwritten otherwise |
salvage=yes |
| online |
specify online=yes to set the instance to online mode |
online=yes
|
infx restore type=physical [ rename tapedev force=yes|no salvage=yes|no online=yes|no ] fork=no
Perform an external restore of the database chunk files. This is done by executing the external restore command, which must
execute onbar or ontape when required.
option
|
description
|
example |
| rename |
path to a file containing chunk rename mappings for onbar/ontape |
rename=/tmp/instrename |
| tapedev |
restore using this value for TAPEDEV, instead of ONCONFIG value |
tapedev=/backup/db |
| force |
specify force=yes to shutdown before restoring |
force=yes |
| salvage |
perform a salvage of the logical logs first, log is overwritten otherwise |
salvage=yes |
| online |
specify online=yes to set the instance to online mode |
online=yes
|
infx restore type=logical [ cont=yes|no online=yes|no ] fork=no
Perform a logical restore. Only valid if the instance is in recovery mode following a physical restore. The logical restore is
performed in continuous mode. To automatically end the logical restore specify cont=yes, otherwise execute the endlogical
service to finish applying transactions.
After the logical restore completes, the database will be in quiescent mode, specify online=yes to bring the instance online.
option
|
description
|
example |
| cont |
specify cont=no to end the logical restore after this media |
cont=no |
| online |
specify online=yes to set the instance to online mode |
online=yes
|
end continuous logical restore
infx restore type=endlogical [ online=yes|no ] fork=no
Stop continuous application of logical logs and bring the database to quiescent mode. Specify online=yes to bring the database
all the way up.
option
|
description
|
example |
| cont |
specify cont=no to end the logical restore after this media |
cont=no |
| online |
specify online=yes to set the instance to online mode |
online=yes
|
infx restore type=warm [ dbspacelist ] fork=no
Use a warm restore to restore down database spaces while the instance remains online and other spaces are accessible.
All down spaces are restored by default, specify dbspacelist= to do only selected spaces.
option
|
description
|
example |
| dbspacelist |
dbspacelist=, optional list of spaces to restore |
dbspacelist=space1,space2 |
infx restore type=hot source= [ rename tapedev force=yes|no online=yes|no ] fork=no
Use hot copy to start a backup in the source instance, and restore that directly to the destination instance. The backup is
transfered through pipes, and is not touched down to disk first. Use the form server@host, if the source instance is on another
host.
option
|
description
|
example |
| source |
name of instance to copy from |
source=infx02 |
| rename |
path to a file containing chunk rename mappings for onbar/ontape |
rename=/tmp/instrename |
| tapedev |
restore using this value for TAPEDEV, instead of ONCONFIG value |
tapedev=/backup/db |
| force |
specify force=yes to shutdown before restoring |
force=yes |
| salvage |
perform a salvage of the logical logs first, log is overwritten otherwise |
salvage=yes |
| online |
specify online=yes to set the instance to online mode |
online=yes
|
Consult the Informix Backup & Restore guide for what is required for a restore to be valid. In summary:
- ONCONFIG values must match between the source and destination instance
- ROOTPATH
- ROOTNAME
- ROOTOFFSET
- MIRROR
- Depending on the type of backup, these may also be required to match:
- TAPEBLK
- TAPESIZE
- LTAPEBLK
- LTAPESIZE
- If the ROOTPATH differs, a renamed restore must be performed
- specify a chunk rename file on the command line rename=
- let infx automatically rename chunks as part of the restore
If the source instance is on another host, ssh keys must be setup to execute the source backup service.
chunk renaming
When copying from one infx instance to another, infx can automatically rename the chunks. This is simply a matter
of taking the source chunk path, and substiting the instance name.
/infx/inst/infx01/chks/root.001 maps to /infx/inst/infx02/chks/root.001
/infx/inst/infx01/chks/infx01.001 maps to /infx/inst/infx02/chks/infx02.001
If the mapped chunk path does not exist, infx attempts to create this file. This is done by executing the INFXCHUNK
config param to create the missing chunk. By default, INFXCHUNK is set to /bin/touch.
If you want the restore to fail when chunk files are missing, set INFXCHUNK=/bin/false in config.ini
Otherwise, use a custom INFXCHUNK script to create missing files for you. The restore service will invoke it with the
full mapped chunk path as the only parameter.
|
|