Restore to Original Server
You can restore IBM Db2 databases from backups stored on Veeam backup repositories in the following ways:
To restore a IBM Db2 database from a full backup, use the following command:
db2 restore db <database_name> load /opt/veeam/VeeamPluginforDB2/libDB2Plugin.so taken at <timestamp> |
- <database_name> is a name of the database you want to restore.
- <timestamp> is a time stamp that IBM Db2 generates for each backup in the yyyymmddhhmmss format. Veeam Plug-in will restore database from the backup file created at the time that you specify in the command.
To learn how to get time stamp, see Get Backup Time Stamp.
Restore from Incremental Backup
To restore a IBM Db2 database from a full backup, use the following command:
db2 restore db <database_name> incremental automatic load /opt/veeam/VeeamPluginforDB2/libDB2Plugin.so taken at <timestamp> |
- <database_name> is a name of the database you want to restore.
- <timestamp> is a time stamp that IBM Db2 generates for each backup in the yyyymmddhhmmss format. Veeam Plug-in will restore database from the backup file created at the time that you specify in the command.
To learn how to get time stamp, see Get Backup Time Stamp.
Important |
To restore database to the previous state, you must use a full online backup of the database. To learn more, see Performing Full Backup. |
To restore database to the previous state, do the following steps:
where <database_name> is a name of the database you want to deactivate.
db2 restore database <database_name> logs load /opt/veeam/VeeamPluginforDB2/libDB2Plugin.so LOGTARGET <path_to_logs> |
- <database_name> is a name of the database you want to deactivate.
- <path_to_logs> is a path to the directory to which Veeam Plug-in will extract archive logs.
db2 restore database <database_name> load /opt/veeam/VeeamPluginforDB2/libDB2Plugin.so taken at <timestamp> replace existing |
- <database_name> is a name of the database you want to restore.
- <timestamp> is a time stamp that IBM Db2 generates for each backup in the yyyymmddhhmmss format. Veeam Plug-in will restore database from the backup file created at the time that you specify in the command.
To learn how to get time stamp, see Get Backup Time Stamp.
- Apply archive logs to return database to the exact state when the backup was created with the following command:
where:
- <database_name> is a name of the database you want to deactivate.
- <path_to_logs> is a path to the directory to which Veeam Plug-in will extract archive logs.
- Recover the database with the following command:
where <database_name> is a name of the database you want to deactivate.
- Re-activate the database with the following command:
where <database_name> is a name of the database you want to deactivate.