Restore to Instance with Different Name
If you plan to restore to a instance with a name that is different from the backed-up instance, see you must perform a redirected restore. To learn more, see this IBM article.
For example, you can use the SET STOGROUP PATHS command. With this command, you can set storage group paths for the database you want to restore. If you selected this approach, do the following steps:
- Run the RESTORE command with the REDIRECT parameter:
db2 restore database <database_name> load /opt/veeam/VeeamPluginforDB2/libDB2Plugin.so taken at <timestamp> REDIRECT |
where:
- <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.
- Set storage group paths for the database with the following command:
db2 set stogroup paths for IBMSTOGROUP on '/home/<instance_name>' |
where: <instance_name> is a name of the target instance to which you want to restore your database.
- Run the RESTORE command again with the CONTINUE parameter:
db2 restore database <database_name> continue |
where <database_name> is a name of the database you want to restore.
After that, your database with be restored and re-configured to comply with the name of the target instance.