The Backup and DR Service mount and migrate feature allows near instant recovery of a volume-level database backup image. Full+Incremental backup images cannot use mount and migrate.
Microsoft SQL server, Oracle, and SAP HANA databases have specific procedures for mount and migrate.
This page provides instructions for these other supported database types:
You can access backup images for these databases in several ways:
- Restore to the source
- Recover to a new target (SAP MaxDB and SAP IQ only)
- Clone
- LiveClone
- Backup and DR Workflow
- Mount
A mount and migrate operation lets you restore a database by first mounting it, and then migrating it to production storage or to a new location. Users have normal access to the database while it is mounted and during the migration step.
Once you have protected a database or instance with a volume-level backup image, you can mount it and migrate it:
This page describes how to make standard and virtual database (application aware) mounts of the other types of databases.
Mount and migrate back to the source
Use these instructions to mount a database from a backup image and migrate the mounted image back to the source.
- 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.
Disable the backup plan to ensure no new jobs interfere with this job.
IBM Db2 only
Mount the image as a standard mount.
If under mount location, you use the mount point
/mydatabase
, then the following is true:- The database backup is mounted under
/mydatabase
- The log backup is mounted under
/mydatabase_archivelog
Once the mount job is completed, run the mountrecover script with the parameters in Arguments to the script.
Name of the script: ACT_DB2_mountrecover.sh
Location of the script: /act/custom_apps/db2/clone/
Script
TARGET_MNT \ TARGET_INSTANCE \ TARGET_DBNAME_LIST \ UNTIL_TIME \ JOBID \
Example
/act/custom_apps/db2/clone/ACT_DB2_mountrecover.sh TARGET_MNT=/db2gj TARGET_INSTANCE=db2prod TARGET_DBNAME_LIST=ENG,TEST1,IND UNTIL_TIME="2020-02-12 04.14.41" JOBID=Job_12332
All other database types
- The database backup is mounted under
When the mount operation completes successfully, the recovered database is operational from the backup/recovery appliance. The next step is to migrate the database to your production storage.
Migrate the data from the backup/recovery appliance to the source
The following prerequisites must be met in order to migrate the data:
- The local target host device shouldn't be in use by another process such as a running database since it needs to be taken offline or online at the start of the pvmove process.
- The size of the target host LVM device must be equal to or more than the
BackupDR_mount_point
size. - Make sure /etc/fstab has the /dev/mapper entries for production data and log volumes.
- Use the df command to learn the Backup and DR mount point.
- To view the available target logical volume manager devices, use the lvdisplay command. You must specify the full logical volume path.
- To view the job name use Monitor > Jobs.
- All other values should be the same as those used during the mount.
Once the mountrecover script is completed, run the migration script:
IBM Db2
Script: /act/custom_apps/db2/restore/ACT_DB2_lvm_migrate_newtarget
/act/custom_apps/db2/restore/ACT_DB2_lvm_migrate_newtarget.sh \ SOURCE_INSTANCE \ TARGET_DBNAME_LIST \ JOBID \ ARCHIVELOG_LOC \ DATAVOL_DISK_MAPPING
Example
/act/custom_apps/db2/restore/ACT_DB2_lvm_migrate_newtarget.sh SOURCE_INSTANCE=db2prod TARGET_DBNAME_LIST=TEST1,TEST2 JOBID=Job_4488748 ARCHIVELOG_LOC=/db2gj_archivelog DATAVOL_DISK_MAPPING=/db2gj/db2/data:/dev/mapper/vg00 vol_data,/db2gj/db2/log:/dev/mapper/vg01 vol_log
MariaDB
Script: /act/custom_apps/mariadb/restore/ACT_MARIADB_lvm_migrate_newTarget.sh
/act/custom_apps/mariadb/lvm_migrate/ACT_MARIADB_lvm_migrate.sh \ JOBID \ OSUSER \ DBUSER \ DBPASSWORD \ BASEDIR \ MARIADB_CNF \ PORT \ SOCKET_FILE \ CONFIG_FILE \ BEGIN_TIME \ UNTIL_TIME \ LOG_BKP_MNTPT \ DATAVOL_DISK_MAPPING
Example:
/act/custom_apps/mariadb/lvm_migrate/ACT_MARIADB_lvm_migrate.sh JOBID=Job_0377678 OSUSER=maria DBUSER=root DBPASSWORD=xxxx BASEDIR=/home/maria/app/mariadb/product/mariaHome_10.3.9 MARIADB_CNF=/act/mnt/Job_12859112_mountpoint_1689356128423/lvmdata/mysqld-auto.cnf PORT=3307 SOCKET_FILE=/home/maria/app/mariadb/admin/mariadb_3307/socket/maria_3307.socket CONFIG_FILE=/home/maria/app/mariadb/admin/mariadb_3307/mariadb_3307.cnf BEGIN_TIME="2020-02-12 21:08:27" UNTIL_TIME="2020-02-12 21:10:00" LOG_BKP_MNTPT=/mmTST_archivelog DATAVOL_DISK_MAPPING=/mmTST/mariadb_3307:/dev/mapper/vg1-m7
MySQL
Script: /act/custom_apps/mysql/lvm_migrate/ACT_MYSQL_lvm_migrate_newTarget
/act/custom_apps/mysql/lvm_migrate/ACT_MYSQL_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ BASEDIR \ DBUSER \ DBPASSWORD \ OSUSER \ PORT \ JOBID \
Example:
/act/custom_apps/mysql/lvm_migrate/ACT_MYSQL_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/chdb/data_1:/dev/mapper/act1581111994981_1581485847546-act_staging_vol,/chdb/log_1:/dev/mapper/act1581111994981_1581485847590-act_staging_vol DBUSER=root DBPASSWORD=password OSUSER=mysql PORT=3434 BASEDIR=/install/mysql-advanced-5.7.26-linux-glibc2.12-x86_64 JOBID=Job_0070633
PostgreSQL
Script: /act/custom_apps/postgresql/restore/ACT_POSTGRESQL_lvm_migrate_newTarget
/act/custom_apps/postgresql/restore/ACT_POSTGRESQL_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ BASEDIR \ OSUSER \ PORT \ DBUSER \ DBPASSWORD \ JOBID \
Example
/act/custom_apps/postgresql/restore/ACT_POSTGRESQL_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/chtst/pgData10.3:/dev/mapper/actdevdatapg103_1594980385483 act_staging_vol BASEDIR=/home/postgres/postgresql_home_10.3 OSUSER=postgres PORT=6010 DBUSER=postgres JOBID=Job_0957580
SAP ASE
Script: /act/custom_apps/sybase/lvm_migrate/ACT_SYBASE_lvm_migrate_newTarget
/act/custom_apps/sybase/lvm_migrate/ACT_SYBASE_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ TARGET_SERVER_NAME \ TARGET_DB_USER \ TARGET_DBUSER_PASSWD \ TARGET_DBNAME_LIST \ JOBID
Example:
/act/custom_apps/sybase/lvm_migrate/ACT_SYBASE_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/mntNT/log/CU1:/dev/mapper/vg2-lv2,/mntNT/data/CU1:/dev/mapper/vg2 lv1 TARGET_SERVER_NAME=ASE1 TARGET_DB_USER=sa TARGET_DBUSER_PASSWD=sybase TARGET_DBNAME_LIST=CU1:SU2 JOBID=Job_12345
SAP IQ
Script: /act/custom_apps/sybaseiq/lvm_migrate/ACT_SYBASEIQ_lvm_migrate_newTarget
/act/custom_apps/sybaseiq/lvm_migrate/ACT_SYBASEIQ_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ newDBNAME \ DBA_USER \ DBA_PASSWD \ JOBID NSTMNT_CHECK PORTNO DBFILE_LOC
Example:
/act/custom_apps/sybaseiq/lvm_migrate/ACT_SYBASEIQ_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/mr/iqlog:/dev/mapper/vg3-log,/mr/iqdata:/dev/mapper/vg3-data newDBNAME=MR DBA_USER=act DBA_PASSWD=passwd JOBID=Job_123456 NSTMNT_CHECK=TRUE PORTNO=2700 DBFILE_LOC=/home/sybaseiq/chdb
SAP MaxDB
Script: /act/custom_apps/maxdb/lvm_migrate/ACT_MAXDB_lvm_migrate_newTarget
/act/custom_apps/maxdb/lvm_migrate/ACT_MAXDB_lvm_migrate_newTarget.sh \ OSUSER \ DBSID \ DBUSER \ DBPASSWORD \ JOBID \ LOCAL_PRG_PATH \ DATAVOL_DISK_MAPPING
Example:
/act/custom_apps/maxdb/lvm_migrate/ACT_MAXDB_lvm_migrate_newTarget.sh OSUSER=sdb DBSID=DEMODB DBUSER=dbm DBPASSWORD=password JOBID=Job_0377678 LOCAL_PRG_PATH=/opt/sdb/MaxDB DATAVOL_DISK_MAPPING=/mmTST/maxdbdata:/dev/mapper/vg1-m7
The output is similar to this:
`INFOMSG: pvmove starting ......................`
`+ pvmove`
` /dev/sdi: Moved: 47.07%`
` /dev/sdi: Moved: 70.43%`
` /dev/sdi: Moved: 93.83%`
When the job is successful, the data moves to the local production storage from backup/recovery appliance-provisioned disks while the database is running. You can validate that the file system for the database created by the mount should now be on a local logical volume rather than the logical volume presented by the mount by running the df command.
- Once the job is successful, the data is moved to the local production storage from disks provisioned from the backup/recovery appliance while the database is running.
- Go to the management console and perform Unmount+Delete.
- Re-enable the backup plan to trigger the scheduled jobs.
Mount and migrate to a new instance
To mount a database image as a virtual database and then migrate it to a new target, perform an application aware mount as detailed in Mount a virtual database from a volume-level backup image.
Migrate the data
The prerequisites for migrating data are listed here:
- The local target host device mustn't be in use by another process such
as a running database since it needs to be taken offline or online
at the start of the
pvmove
process. - Ensure that the size of target host logical volume manager device is equal to or more than BackupDR_mount_point size.
- Ensure that /etc/fstab has the /dev/mapper entries for production data and log volumes.
- Use the df command to learn the Backup DR mount point.
- View available target logical volume manager devices using the lvdisplay command. You need to specify the full logical volume path.
- Use Monitor > Jobs to view the job name.
- All other values should be the same as those used during the mount.
Once the mount is completed, run the
ACT_<database type>_lvm_migrate_newtarget
script with the parameters in the arguments to the script sections.IBM Db2
Script:/act/custom_apps/db2/restore/ACT_DB2_lvm_migrate_newtarget.sh
/act/custom_apps/db2/restore/ACT_DB2_lvm_migrate_newtarget.sh \ SOURCE_INSTANCE \ TARGET_DBNAME_LIST \ JOBID \ ARCHIVELOG_LOC \ DATAVOL_DISK_MAPPING \
Example:
/act/custom_apps/db2/restore/ACT_DB2_lvm_migrate_newtarget.sh
SOURCE_INSTANCE=db2prod TARGET_DBNAME_LIST=TEST1,TEST2
JOBID=Job_4488748 ARCHIVELOG_LOC=/db2gj_archivelog
DATAVOL_DISK_MAPPING=/db2gj/db2/data:/dev/mapper/vg00
vol_data,/db2gj/db2/log:/dev/mapper/vg01 vol_log
MariaDB
Script: /act/custom_apps/mariadb/restore/ACT_MARIADB_lvm_migrate_newTarget.sh
/act/custom_apps/mariadb/lvm_migrate/ACT_MARIADB_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ BASEDIR \ DBUSER \ DBPASSWORD \ OSUSER \ PORT \ JOBID \
Example:
/act/custom_apps/mariadb/lvm_migrate/ACT_MARIADB_lvm_migrate_newTarget.sh JOBID=Job_1266533 DBUSER=root DBPASSWORD= BASEDIR=/install/maria OSUSER=maria PORT=3434 DATAVOL_DISK_MAPPING=/chdb/data1:/dev/mapper/vgnew-mariaData
MySQL
Script: /act/custom_apps/mysql/restore/ACT_MYSQL_lvm_migrate_newTarget.sh
/act/custom_apps/mysql/lvm_migrate/ACT_MYSQL_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ BASEDIR \ DBUSER \ DBPASSWORD \ OSUSER \ PORT \ JOBID \
Example:
/act/custom_apps/mysql/lvm_migrate/ACT_MYSQL_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/chdb/data_1:/dev/mapper/act1581111994981_1581485847546-act_staging_vol,/chdb/log_1:/dev/mapper/act1581111994981_1581485847590-act_staging_vol DBUSER=root DBPASSWORD=password OSUSER=mysql PORT=3434 BASEDIR=/install/mysql-advanced-5.7.26-linux-glibc2.12-x86_64 JOBID=Job_0070633
PostgreSQL
Script: /act/custom_apps/postgresql/restore/ACT_POSTGRESQL_lvm_migrate_newTarget.sh
/act/custom_apps/postgresql/restore/ACT_POSTGRESQL_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ BASEDIR \ OSUSER \ PORT \ DBUSER \ DBPASSWORD \ JOBID \
Example:
/act/custom_apps/postgresql/restore/ACT_POSTGRESQL_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/chtst/pgData10.3:/dev/mapper/actdevdatapg103_1594980385483 act_staging_vol BASEDIR=/home/postgres/postgresql_home_10.3 OSUSER=postgres PORT=6010 DBUSER=postgres JOBID=Job_0957580
SAP ASE
Script: /act/custom_apps/sybase/lvm_migrate/ACT_SYBASE_lvm_migrate_newTarget
/act/custom_apps/sybase/lvm_migrate/ACT_SYBASE_lvm_migrate_newTarget.sh \ DATAVOL_DISK_MAPPING \ TARGET_SERVER_NAME \ TARGET_DB_USER \ TARGET_DBUSER_PASSWD \ TARGET_DBNAME_LIST \ JOBID \
Example:
/act/custom_apps/sybase/lvm_migrate/ACT_SYBASE_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/mntNT/log/CU1:/dev/mapper/vg2-lv2,/mntNT/data/CU1:/dev/mapper/vg2-lv1 TARGET_SERVER_NAME=ASE1 TARGET_DB_USER=sa TARGET_DBUSER_PASSWD=sybase TARGET_DBNAME_LIST=CU1:SU2 JOBID=Job_12345
SAP IQ
Script: /act/custom_apps/sybaseiq/lvm_migrate/ACT_SYBASEIQ_lvm_migrate_newTarget
/act/custom_apps/sybaseiq/lvm_migrate/ACT_SYBASEIQ_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING \ TARGET_DBNAME \ DBA_USER \ DBA_PASSWD \ JOBID NSTMNT_CHECK PORTNO DBFILE_LOC
Example:
/act/custom_apps/sybaseiq/lvm_migrate/ACT_SYBASEIQ_lvm_migrate_newTarget.sh DATAVOL_DISK_MAPPING=/mr/iqlog:/dev/mapper/vg3-log,/mr/iqdata:/dev/mapper/vg3-data newDBNAME=MR DBA_USER=act DBA_PASSWD=passwd JOBID=Job_123456 NSTMNT_CHECK=TRUE PORTNO=2700 DBFILE_LOC=/home/sybaseiq/chdb
SAP MaxDB
Script: /act/custom_apps/maxdb/lvm_migrate/ACT_MAXDB_lvm_migrate_newTarget
/act/custom_apps/maxdb/lvm_migrate/ACT_MAXDB_lvm_migrate_newTarget.sh \ OSUSER \ DBSID \ DBUSER \ DBPASSWORD \ JOBID \ LOCAL_PRG_PATH \ DATAVOL_DISK_MAPPING \
Example:
/act/custom_apps/maxdb/lvm_migrate/ACT_MAXDB_lvm_migrate_newTarget.sh OSUSER=sdb DBSID=DEMODB DBUSER=dbm DBPASSWORD=password JOBID=Job_0377678 LOCAL_PRG_PATH=/opt/sdb/MaxDB DATAVOL_DISK_MAPPING=/mmTST/maxdbdata:/dev/mapper/vg1-m7
When the job is successful, the data is moved to the local production storage from disks provisioned from the backup/recovery appliance while the database is running. Go to the management console and perform an Unmount+Delete.