restore
This section describes how to use the restore service to recover instances.
backup & restore manager
Like the backup service, the restore service uses a backup and restore manager that maps backup functions to commands.
See BAR manager, for more details.
For the purposes of this guide, I will continue with the infx default ontape restore commands.
requirements
You will have to meet certain configuration requirements for a restore, such as the same operating system and informix software versions.
See the Informix Backup and Restore Guide for more details.
infx restore
infx supports the following types of restores:
function | description |
---|---|
full | All storage spaces and logical logs |
physical | Only storage spaces are restored |
ext | External restore |
logical | Apply transaction logs |
endlogical | End the application of transaction logs |
salvage | Salvage logical log |
warm | Online, partial restore |
hot | Hot copy of data from one instance to another |
These are mapped to the following ontape commands.
infx command | ontape command |
---|---|
infx restore type=full | ontape -r -v -d |
infx restore type=physical | ontape -p -v -d |
infx restore type=ext | /infx/local/scripts/ |
infx restore type=logical | ontape -l -C -d |
infx restore type=endlogical | ontape -l -X -d |
infx restore type=salvage | ontape -S -d |
infx restore type=warm | ontape -r -v -d |
infx restore type=hot | ontape -p -t STDIO -v |
parameter | description |
---|---|
force | Force the instance offline if its up when the restore starts |
online | Instead of leaving the instance in quiescent mode, bring it up to online mode |
rename | Supply a file that renames chunks |
tapedev | Override the ONCONFIG TAPEDEV parameter with this value |
full restore commands
command | description |
---|---|
infx restore type=full | Full restore of most recent storage space backups and logical logs. Instance must be offline. |
infx restore type=full force=yes online=yes | Shutdown instance, full restore, set instance to online mode when complete |
infx restore type=full tapedev= |
Full restore storage space backups from /tmp/backup |
physical restore
The physical restore will restore the storage space backups only, and does not apply any transactions logs.
You use this function when you want to delay or skip applying transactions, or start HDR replication.
At the end of the restore, the instance will be in “fast recovery” mode, waiting for you to take the next action.
parameters
parameter | description |
---|---|
force | Force the instance offline if its up when the restore starts |
online | Instead of leaving the instance in quiescent mode, bring it up to online mode |
rename | Supply a file that renames chunks |
salvage | Salvage logical logs from disk first |
tapedev | Override the ONCONFIG TAPEDEV parameter with this value |
physical restore commands.
command | description |
---|---|
infx restore type=physical | Physical restore only of latest storage space backups |
infx restore type=physical online=yes | Physical restore only, set instance to online mode |
external restore
You use this function when you restore storage spaces that were backed up with an external utility.
You provide the script with the required storage restore commands.
The restore service runs the relevant restore and onmode commands, then calls your script to do the actual data restore.
parameters
parameter | description |
---|---|
force | Force the instance offline if its up when the restore starts |
online | Instead of leaving the instance in quiescent mode, bring it up to online mode |
rename | Supply a file that renames chunks |
salvage | Salvage logical logs from disk first |
tapedev | Override the TAPEDEV parameter |
external restore commands.
command | description |
---|---|
infx restore type=ext | External restore |
infx restore type=ext online=yes | External restore only, set instance to online mode |
logical restore
Use the logical function of the restore service to apply transaction logs. You only use this function after run a storage space restore..
The logical restore is performed in continuous mode by default. This gives you the option of waiting to apply further transactions, or bringing the instance online manually.
parameters
parameter | description |
---|---|
cont | Specify cont=no to end the logical restore when complete |
online | Bring the instance online when the roll forward completes, otherwise instance is in quiescent mode |
command | description |
---|---|
infx restore type=logical | Apply all transactions from default location, stays in continuous roll forward mode |
infx restore type=logical cont=no online=yes | Apply transactions, end the roll forward and bring instance to online mode. |
end continuous logical restore
Use the endlogical function of the restore service to signify that the transaction roll forward is complete.
Execute this command when you have no more transactions logs to apply, and are ready to bring the instance online.
parameters
parameter | description |
---|---|
online | Bring the instance online when the roll forward completes, otherwise instance is in quiescent mode |
endlogical restore commands
command | description |
---|---|
infx restore type=endlogical | End the continuous roll forward |
infx restore type=endlogical online=yes | Complete the roll forward and bring the instance online |
warm restore
Use the warm function of the restore service to restore selected storage spaces while the instance is online.
This function recovers down, non-critical storage spaces, while the instance is online.
During this restore, data in online storage spaces is still available, while the offline spaces are being restored.
The warm restore function restores the storage spaces and then applies all transaction logs.
parameters
parameter | description |
---|---|
dbspacelist | Warm restore these spaces only, otherwise all down spaces are restored. |
warm restore commands
command | description |
---|---|
infx restore type=warm | Warm restore all down storage spaces |
infx restore type=warm dbspacelist= |
Only restore dat01 and dat02 storage spaces |
hot copy
Use the hoy copy function of the restore service to copy the contents of one instance to another. A backup is performed on the fly in the source instance and restored directly to the destination instance.
If the source instance is on a different host, infx uses ssh to execute the backup.
If the source instance and destination instance chunk names differ, infx generates a rename file to map the chunks.
Example of the automatic chunk renaming from instance infx01 to infx02.
If the chunk file does not exist in the destination instance, infx uses the command specified in the INFXCHUNK parameter to create the new chunk.
parameters
parameter | description |
---|---|
force | Force the instance offline if its up when the restore starts |
online | Instead of leaving the instance in quiescent mode, bring it up to online mode |
rename | Supply a file that renames chunks |
salvage | Salvage logical logs from disk first |
tapedev | Override the TAPEDEV parameter |
Example hot copy commands.
command | description |
---|---|
infx restore type=hot source=infx01 online=yes | Copy from instance infx01, bring instance online when complete |