Use XML to restore databases.
Procedure
-
If you are not logged on to the CommServe computer, run the qlogin command.
-
Download the restore.xml file to the computer where you will run the command.
-
On the command line, go to Software_Installation_Directory/Base, and then and type the following command:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'True' -logical 'True'
Notes
-
For information on supported instance XML parameters, see Available XML Parameters for Informix.
-
You can define the XML parameters in the xml file, instead of on the command line. For information on command line parameters and XML elements, see Command Line - Syntax.
-
-
To log off the CommServe computer, run the qlogout command.
Examples
Restoring from the Latest Backup
Example of physical restore for the entire instance:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'True' -logical 'False'
Example of logical restore for the entire instance:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'False' -logical 'True'
Restoring Files to a Point in Time
Example of point-in-time restore for the entire instance:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'True' -logical 'False' -informixRestoreOptionType 'TIME' -timeValue '2021-07-21 18:47:18' -TimeZoneName '(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi'
Restoring Files to Another Client or Instance (Cross Machine)
Example of cross-machine physical restore for the entire instance:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'True' -logical 'False' -destClient/clientName 'client2' -destinationInstance/instanceName 'instance2'
Restoring Files to a Point in Log
Example of point-in-log restore for the entire instance:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'True' -logical 'False' -informixRestoreOptionType 'UPTOLOGICAL' -logicalLogNumber 156
Restoring Configuration Files
Example of configuration file restore:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'ENTIRE_INSTANCE_RESTORE' -physical 'True' -logical 'False' -restoreEmergencyBootFile 'True' -restoreOnConfigFile 'True'
Restoring the Whole System
Example of restore for the whole system:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'WHOLE_SYSTEM_RESTORE' -physical 'True' -logical 'False'
Restoring Partial Databases
Example of restore for partial dbspaces, such as datadbs and sbspace1:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'PARTIAL_RESTORE' -physical 'True' -logical 'False' -sourceItem 'datadbs' -sourceItem 'sbspace1'
Restoring Only Logs
Example of restore for logs only:
qoperation execute -af restore.xml -appName 'Informix Database' -clientName 'client1' -instanceName 'instance1' -backupsetName 'default' -subclientName 'default' -informixRestoreType 'LOG_ONLY'