Recover SAP IQ and SAP MaxDB databases from a volume-based backup image to a new location
Both these procedures require you to customize and run a config file.
The following sections describe how to recover a volume-based backup image of an SAP IQ or SAP MaxDB database to a new location.
To recover a volume-level backup image of an IBM Db2, MariaDB, MySQL, PostgreSQL, SAP ASE, SAP IQ, or SAP MaxDB database to a new target, you can also use the instant mount and migrate of a database to a new target procedure.
To recover a Full+Incremental backup image of an IBM Db2, PostgreSQL, SAP ASE, SAP IQ, and SAP MaxDB databases to a new target, see Recover a Full+Incremental backup image of other databases to a new target.
Recovery procedure
To recover a volume-level backup image to a new target, follow these steps:
From the App Manager Applications list, right-click the protected database and select Access. You can use the Managed Backup Plan status filter to show only protected databases.
Select the latest snapshot to recover, and choose Mount.
Provide a target mount point under mount location, for example,
/dmpRstNew
. This is used as the variable TARGET_MNT_PNT.The database backup is mounted under /dmpRstNew (TARGET_MNT_PNT) and the log backup is mounted under /dmpRstNew_archivelog (LOG_BKP_MNTPT).
Log into the database server as root. Change the directory to
/act/custom_apps/<database type>/restore
.Run the script.
SAP IQ
Script name: act_sybaseiq_lvm_customdb_recovery.sh
Script location: /act/custom_apps/sybaseiq/restore
Script:
/act/custom_apps/sybaseiq/restore/act_sybaseiq_lvm_customdb_recovery.sh TARGET_MNT OSUSER CATALOG_DB_FILE SRC_DB_DBA_USER SRC_DB_DBA_PWD LOG_BKP_MNTPT RECOVERY_TIME JOBID INCR_BKP_LOC
Variables for the script:
- TARGET_MNT: The mount point provided during the mount job from Step 3
- OSUSER: The OS user of the target SAP IQ database
- CATALOG_DB_FILE: The source database file full path, such as
/lv3Data/lv3DB/data/lv3DB.db
- SRC_DB_DBA_USER: Target utility db user
- SRC_DB_DBA_PWD: Target utility db password
- LOG_BKP_MNTPT: Get this from the mount point provided during the mount job, followed by _archivelog, for example
/SDBR_archivelog
- RECOVERY_TIME: (Optional) The time of the last known good database and logs desired recovery time in the format
"YYYY-MM-DD HH:MM:SS"
- JOBID: The mount job id (from the management console, Monitor > Jobs tab) in the format
Job_1479897
- INCR_BKP_LOC: Incremental backup file path, for example
/act/tmpdata/Job_1479897/INC_BKP.1
always /act/tmpdata//INC_BKP.1
After the script has run, connect to the IQ database and confirm that the databases are recovered and online.
dbisql -c "uid=<username>;pwd=<password>;eng=<engine name>;dbn=<database name>;" -nogui
SAP MaxDB
Script name: /var/act/scripts/ACT_MAXDB_lvmRestore_newTarget.conf
Script location: /act/custom_apps/maxdb/restore
Script:
/act/custom_apps/maxdb/restore/ACT_MAXDB_lvmRestore_newTarget.sh OSUSER TARGET_SERVER_NAME TARGET_DB_USER TARGET_DBUSER_PASSWD SOURCE_DBSID MANIFEST_FILE_LOC SRC_DB_VERSION ACT_JOBNAME TARGET_MNT_PNT LOG_BKP_MNTPT UNTIL_TIME BEGIN_TIME
Variables for the script:
- OSUSER: The OS user of the target MaxDB database
- TARGET_SERVER_NAME: The SID of the target MaxDB database
- TARGET_DB_USER and TARGET_DBUSER_PASSWD: The DBM username and password for the target MaxDB database. These must be the same as source DBM username and password. You can change the password after the restore operation is finished.
- SOURCE_DBSID: SID of the source MaxDB database
- MANIFEST_FILE_LOC: the full path to Manifest_File_SLD
- SRC_DB_VERSION: The version number of the source MaxDB database
- ACT_JOBNAME: The mount job id (from the management console, Monitor > Jobs tab) in the format
Job_1479897
- TARGET_MNT_PNT: The mount point provided during the mount job (from the management console, Monitor > Jobs tab)
- LOG_BKP_MNTPT: Get this from the mount point provided during the mount job, followed by _archivelog, for example
/SDBR_archivelog
- UNTIL_TIME: The desired time for the recovery to be finished, in the format
"YYYY-MM-DD HH:MM:SS"
(from the management console, of the mounted backup image) - BEGIN_TIME: The time to start the recovery, in the format
"YYYY-MM-DD HH:MM:SS"
(from the management console, of the mounted backup image)
Connect to the MaxDB database and confirm that the databases are recovered and online:
dbmcli -d TARGET_SERVER_NAME -u TARGET_DB_USER,TARGET_DBUSER_PASSWD db_state
After the database is restored, take a dummy or dump database backup to generate a backup history point in backup_history_list, which is required to take log backups. For example, the following:
dbmcli -d
>MAXDB_KEY -uUTL -c backup_start DATA AUTOIGNORE Without this, future volume level backups fail with the error fail to trigger autolog backup template.
Unmount the mounted snapshot image.
Change the password
In some cases, you may need to change the database password.
SAP IQ
Log into the target database. For a database named
TARGET_SERVER_NAME
, with db user SRC_DB_DBA_USER and password SRC_DB_DBA_PWD, the command to log in is as follows.dbisql -nogui -onerror exit -c 'uid=SRC_DB_DBA_USER;pwd=SRC_DB_DBA_PWD;dbn=TARGET_SERVER_NAME;eng=TARGET_SERVER_NAME;'
Run the following command to change password.
ALTER USER actuser IDENTIFIED BY new_password
Log in again with new password to verify:
dbisql -nogui -onerror exit -c 'uid=actuser;pwd=new_password;dbn=TARGET_SERVER_NAME;eng=TARGET_SERVER_NAME;'
SAP MaxDB
To change the password, log into the target db as DBM user:
dbmcli -d TARGET_SERVER_NAME -u TARGET_DB_USER,TARGET_DBUSER_PASSWD user_changepwd dbm <new_password>
For example, for a DBM user changing the password from abcdef to fedcba, log in:
dbmcli -d glxn -u dbm,abcdef
Run the following command:
user_changepwd dbm abcdef
Log in again with the new password:
dbmcli -d glxn -u dbm,fedcba
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-06 UTC.