DBA SAP-MaxDB
DBA SAP-MaxDB
to Actifio GO
Updated on August 31, 2022
Copyright, Trademarks, and other Legal Matter
Copyright © 2022 Google LLC. All rights reserved.
Actifio™, OnVault™, and VDP™ are trademarks of Google LLC.
All other brands, product names, goods and/or services mentioned herein are trademarks or property of their
respective owners.
Chapter 1 - SAP MaxDB DBA’s Introduction to Actifio Copy Data Management ........................................................................1
Adding an SAP MaxDB Database Host and Discovering the Database .....................................................................................................................3
Discovering the SAP MaxDB Database Application from the Application Manager ....................................................................................................................... 5
The information presented in this guide is intended for users who are familiar with basic Actifio processes
and procedures as described in Getting Started with Actifio GO and who are qualified to administer SAP
MaxDB databases.
1
SAP MaxDB with Traditional File-Based Backup
2
2 Preparing an SAP MaxDB
Database for Protection
This section details the steps involved in preparing an SAP MaxDB database for Actifio protection and
management:
Before You Begin on page 3
Adding an SAP MaxDB Database Host and Discovering the Database on page 3
a. Adding the Host from the AGM on page 4
b. Discovering the SAP MaxDB Database Application from the App Manager on page 5
c. Finding the Discovered SAP MaxDB Database in the App Manager on page 6
3
Adding the Host from the AGM
To add the host:
1. From the AGM Manage > Hosts list, in the upper right corner, click +Add Host.
3. Click Add at bottom right to add the host. The Host will be added.
4. Right-click the host and select Edit.
5. On the Edit Host page: Set the staging disk format:
o For block-based backup with CBT, select Block.
o For file-based backup with Full+Incremental file system backup: select either Block or
NFS.
4
6. Select Save at the bottom of Edit Host page.
Discovering the SAP MaxDB Database Application from the App Manager
To discover the SAP MaxDB database:
1. From the App Manager, Applications list, select + Add Application in the upper right corner.
3. Select the host and click Next in the bottom right corner. Discovery may take a while. Then
follow the Onboarding Wizard to completion.
5
Finding the Discovered SAP MaxDB Database in the App Manager
To find the newly-discovered database, go to the App Manager, Applications list. All applications known
to the AGM of all types are listed. Use the Type application filter on left pane to show only SAP MaxDB
databases.
6
3 Configuring the Backup
Method
After the database is prepared and discovered as explained in Chapter 2, Preparing an SAP MaxDB
Database for Protection, you can configure an Actifio backup method for the database.
• Using block-based volume level LVM snapshots with CBT on Linux. This option enables you to
create application-aware virtual databases from the snapshot images.
• Using file-based traditional backup and recovery. This “file dump” method does not support the
creation of virtual databases, and it requires Setting the Schedule for Dumps on page 12.
The procedures for developing SLAs are detailed in the AGM online help. This chapter provides additional
information of value to the MaxDB DBA.
Whichever method you select involves these steps:
SAP MaxDB Application Details & Settings on page 8
Ensuring that the Backup Capture Method is Set Correctly on page 9
Ensuring that the Staging Disk Format on the Host is Set Correctly on page 10
Setting the Schedule for Dumps on page 12
7
Table 1: SAP MaxDB Application Details & Settings
Use Staging Disk For applications that are under the size of granularity setting that tend to periodically
Granularity as Minimum grow this new option is useful to avoid frequent costly FULL backups. Because the
Staging Disk Size staging disk is thin provisioned, there is no initial cost to use a staging disk that is
larger than required for immediate use.
The values are 0 for No and the Staging Disk Granularity setting for Yes.
Staging Disk Granularity Maximum size of each staging disk when multiple staging disks are used for an
application. The default value is 1000GB.
Last Staging Disk Minimum size of the last staging disk created for an application with multiple staging
Minimum Size disks. This value is also used for additional disks allocated to accommodate growth.
The default value is 250GB.
Connector Options Use this only under the direction of Actifio Support.
Backup Capture Method Use volume level backup Use full+incremental filesystem backup
Force Full Filesystem Not applicable Use for an on demand full backup
Backup
Log Backup Staging Disk By default Actifio calculates this as daily log generation * retention of log backup SLA
Size in GB plus 20% buffer. Default is recommended.
Providing a value will override the default calculation and the log disk will not grow
dynamically. This will become a fixed size
Retention of Production This value is used to purge the log backup from basepath_logbackup destination.
DB Logs in Days Based on this setting the last data backup id will be selected (CURRENT_TIMESTAMP, -
the # days set) and the log will be purged older than the data backup id. Default
value is 0 days. With default value all logs prior to last data backup will be purged.
Script Timeout The timeout value is applied to internal backup and recovery scripts called by
connector. The default value is recommended.
8
Ensuring that the Backup Capture Method is Set Correctly
Backup capture settings depend upon the backup capture method that you need. Be certain that you
have set the right backup method for your needs:
1. In the App Manager Applications list, right-click the database and select Manage SLA.
2. At the top of the Manage SLA page, select the Details & Settings link:
This opens the details and settings for this database. Check the Backup Capture Method:
o LVM Snapshot with Change Block Tracking: Use volume level backup.
o Traditional Backup and Recovery API “file-based” backups: Use full+incremental backup.
Note: System databases on a root partition can be backed up as LVM Snapshots and later
mounted as virtual databases, but they cannot be used in a traditional Restore operation as the
root partition cannot be unmounted. This will need manual restore and recovery from a simple
mount back to the same host.
3. Click Save Changes at the bottom of the page if you had to change anything.
9
Ensuring that the Staging Disk Format on the Host is Set Correctly
Choose between:
• Staging Disk Format: File-Based Traditional Backup and Recovery in NFS/Block on page 10
• Staging Disk Format: LVM Snapshot with Change Block Tracking on Linux on page 11
Note: File-based backup also requires the DB dump schedule be configured. See Setting the Schedule
for Dumps on page 12.
10
Staging Disk Format: LVM Snapshot with Change Block Tracking on Linux
To set the staging disk format for storage snapshots:
1. From the Manage, Hosts list, right-click the host and select Edit.
11
Setting the Schedule for Dumps
The database dump schedule is set by the Actifio CLI policy parameter dumpschedule. The default value
of dumpschedule=“FIIIIII":
• The string must be seven characters - either an 'F' or an ’I’
• Each position within the string represents a weekday, starting with Sunday.
• F represents a full db dump
• I represents an incremental db dump
For example, “FIIIIII” results in:
• Sunday: Full backup
• Monday through Saturday: Incremental backups
• The following Sunday: Full backup again
To check the dump schedule, run this CLI command from the Actifio Appliance:
udsinfo lspolicyoption -filtervalue appid=<appid> | grep dumpschedule
If this does not return any value, then the dumpschedule is set to default.
To modify the dump schedule run this CLI command from the Actifio Appliance:
udstask mkpolicyoption -appid <appid> -name "dumpschedule" -value "FIIIIII"
Replace <appid> with the application id of the MaxDB application.
Replace "FIIIIII" as needed.
Example
To run full backup on Saturday and Tuesday, set dumpschedule="IIFIIIF"
For more information, refer to the Actifio CLI Reference.
12
4 Protecting an SAP MaxDB
Database and its Logs
2. On the Manage SLA page, select a template and a resource profile, then click Apply SLA.
3. On the Apply SLA page, fill in the required field based on type of backup as detailed in Ensuring
that the Backup Capture Method is Set Correctly on page 9.
4. Click Save Changes. The database appears in the App Manager Applications list with a green
shield icon, and the database will be protected when the job runs according to the schedule in
the template.
13
Protecting SAP MaxDB Database Logs
To enable and set up the SAP MaxDB database log backup:
1. From the SLA Architect, Templates list, right-click the template for SAP MaxDB database
protection and click Edit.
2. Click the arrow beside the Snapshot policy to open up the details, then click Edit Policy.
14
4. Set the log policy options (you will have to scroll to see them all):
o Enable Truncate/Purge log after backup.
o Set Enable Database Log Backup to Yes.
o For RPO (Minutes), enter the desired frequency of log backup.
o Set Log Backup Retention Period (in Days) for point in time recovery.
o Set Replicate Logs (Uses StreamSnap Technology) to Yes if you want to enable
StreamSnap replication of log backup to a DR site.
o Set Send Logs to OnVault Pool to Yes if you want the database logs to be sent to an
OnVault Pool, enabling for point-in-time recoveries from OnVault on another site.
15
16
5 Restoring, Accessing, or
Recovering an SAP MaxDB
Database
This section describes:
Mount and Refresh from Block-Based Volume Snapshot to a Target MaxDB Server as a Virtual
Database on page 17
Refreshing a Virtual Database Using an Actifio Workflow on page 19
Restoring and Recovering a MaxDB Database to the Source on page 21
o Recovering from a Block-Based Volume Snapshot to the Source on page 21
o Recovering from a File-Based Full+Incremental Backup to the Source on page 23
Restoring a MaxDB Database to a New Target on page 24
o Restoring from a Block-Based Volume Snapshot to a New Target on page 24
o Restoring from a File-Based Full+Incremental Backup to a New Target on page 27
17
2. Select a snapshot image and choose Mount.
3. On the Mount page, from Target, choose the desired target MaxDB server from the dropdown.
4. Under Application Options, enable Create New Virtual Application.
5. For a database protected with log roll-forward, choose a target point in time.
6. Fill in:
TARGET DATABASE NAME: The name of the target MaxDB database
MAXDB TARGET OS USER NAME: OS user for target MaxDB instance
MAXDB TARGET DB USER NAME: dbm user for target MaxDB
MAXDB TARGET DB PASSWORD: dbm user password for target MaxDB
7. To protect the new virtual database, enable Manage New Application. Then choose a template
and a resource profile to protect the database.
8. In Advanced Options, you can enter the Home Directory of the MaxDB database, and for
Overwrite Existing Database, indicate when to overwrite a database on the target server that
has the same name as the new database(s) being mounted: Yes, No, or Only if it’s Stale.
9. Under Mapping Options:
o Storage Pool: The image will be mounted in the Snapshot Pool unless you select a
different one.
o Mount Location: specify a target mount point to mount the new virtual database to.
10. Click Submit.
18
Refreshing a Virtual Database Using an Actifio Workflow
You can use a workflow to automate the process of mounting and refreshing a Db2 instance's databases
from a snapshot.
1. From the AGM App Manager, right-click the Db2 Instance and select Manage Workflows.
2. In the upper right corner of the Workflows: Application Dashboard page, click + Add Workflow.
3. Specify:
o Workflow Name: Enter a name for this workflow.
o Workflow Type: Select Direct Mount.
o Schedule Type: Choose Scheduled or On Demand based on your requirement. For a
scheduled workflow, specify the frequency as well.
19
o Mount Location: Specify a mount point to mount the data volumes and log volumes of
the target.
o Pre-Script (optional): Specify a prescript name to be run before refresh. Pre scripts are
detailed in Network Administrator’s Guide to Actifio VDP.
o Post-Script (optional): Specify a postscript name to be run at the end of refresh. Post
scripts are detailed in Network Administrator’s Guide to Actifio VDP.
o Create New Virtual Application: Enable Create New Virtual Application.
o Select Items: Select the databases to refresh on target and specify the target dbname
from 'Database Options' for each database.
o Target Instance Name: If the target instance is visible, select it. Otherwise specify the
target instance name.
20
Restoring and Recovering a MaxDB Database to the Source
Depending on how you protected the database, you need the procedure for:
Recovering from a Block-Based Volume Snapshot to the Source on page 21
Recovering from a File-Based Full+Incremental Backup to the Source on page 23
Note: System databases on a root partition backed up as LVM Snapshots can be mounted as virtual
databases, but they cannot be used in a traditional Restore operation as the root partition cannot be
unmounted. This will need manual restore and recovery from a simple mount back to the same host.
21
3. On the Restore page choose a point in time for the protected database to recover to.
22
Recovering from a File-Based Full+Incremental Backup to the Source
Use this procedure to restore and recover the source MaxDB database from a traditional file-based
full+incremental backup image. This procedure overwrites the source data. To recover a volume-base
backup with CBT, see Recovering from a Block-Based Volume Snapshot to the Source on page 21.
Using this method, we can restore databases on a MaxDB Instance.
To recover back to the source, overwriting the source data:
1. From the App Manager Applications list, right-click the protected database and select Access.
You can use the Managed SLA Status filter to show only protected databases.
3. For a database with multiple volumes, select some or all volumes to restore.
4. Click Submit. This will start the source database physical recovery using MaxDB recover
commands.
23
Restoring a MaxDB Database to a New Target
Both of these procedures require you to customize and run a config file.
Depending on how you protected the database, you need the procedure for:
Restoring from a Block-Based Volume Snapshot to a New Target on page 24
Restoring from a File-Based Full+Incremental Backup to a New Target on page 27
Argument Description, or Code to Get the Value (run on the target server)
SRC_DB_VERSION #dbmcli -d <SRC_DBSID> dbm_version | grep "VERSION" | awk -F"= " '{print $2}'
24
Procedure
To restore a block-based Volume Level backup image to a new target:
1. From the App Manager Applications list, right-click the protected database and select Access.
You can use the Managed SLA Status filter to show only protected databases.
2. Select the latest snapshot to recover, and choose Mount.
3. Provide a target mount point under mount location, for example: /dmpRstNew. This will be used
as the variable TARGET_MNT_PNT.
The database backup will be mounted under /dmpRstNew (TARGET_MNT_PNT) and the log
backup will be mounted under /dmpRstNew_archivelog (LOG_BKP_MNTPT).
4. Log into the database server as root. Change directory to /act/custom_apps/maxdb/restore:
#cd /act/custom_apps/maxdb/restore
5. Run the ACT_MAXDB_lvmRestore_newTarget.sh config file as root user.
#sh ACT_MAXDB_lvmRestore_newTarget.sh
25
6. Connect to the MaxDB instance and confirm that the databases are recovered and online:
#dbmcli -d <TARGET_SERVER_NAME> -u <TARGET_DB_USER>,<TARGET_DBUSER_PASSWD> db_state
7. Unmount the mounted snapshot image.
26
Restoring from a File-Based Full+Incremental Backup to a New Target
Before You Begin
This procedure requires you to customize and run /var/act/scripts/
ACT_Maxdb_dumpRestore_newTarget.conf.
After the file has been edited, save it to /act/custom_apps/maxdb/dump.
These are the arguments in the config file, and where to get the values:
Argument Description, or Code to Get the Value (run on the target server)
LOG_MNT_PNT TargetDB log file mount point If target server directory structure is different from
source
DATA_MNT_PNT TargetDB data file mount point If target server directory structure is different from
source
SRC_DB_VERSION #dbmcli -d <SRC_DBSID> dbm_version | grep "VERSION" | awk -F"= " '{print $2}'
27
Procedure
To restore a traditional File-Based full+incremental backup image to a new target:
1. From the App Manager Applications list, right-click the protected database and select Access.
You can use the Managed SLA Status filter to show only protected databases.
2. Select the latest snapshot to recover, and choose Mount.
3. Provide a target mount point under mount location, for example: /dmpRstNew. This will be used
as the variable DUMPBKPLOC. The database backup will be mounted under /dmpRstNew
(DUMPBKPLOC) and the log backup will be mounted under /dmpRstNew_archivelog
(LOG_BKP_MNTPT).
4. Log into the database server as root and change directory to /act/custom_apps/maxdb/dump:
#cd /act/custom_apps/maxdb/dump
5. Run the ACT_MAXDB_dumpRestore_newTarget.sh config file as root user.
#sh ACT_MAXDB_dumpRestore_newTarget.sh
6. Connect to the MaxDB instance and confirm that the databases are recovered and online:
28
#dbmcli -d <TARGET_SERVER_NAME> -u <TARGET_DB_USER>,<TARGET_DBUSER_PASSWD> db_state
7. Unmount the mounted dump snapshot image.
29
30