Back up SAP HANA databases
If a resource is not yet part of any resource group, you can back up the resource from the Resources page.
-
You must have created a backup policy.
-
If you want to back up a resource that has a SnapMirror relationship with a secondary storage, the ONTAP role assigned to the storage user should include the “snapmirror all” privilege. However, if you are using the “vsadmin” role, then the “snapmirror all” privilege is not required.
-
For Snapshot copy-based backup operation, ensure that all the tenant databases are valid and active.
-
To create SAP HANA system replication backups, it is recommended to add all the resources of the SAP HANA system into one resource group. This ensures a seamless backup during takeover-failback mode.
-
If you want to create a file-based backup when one or more tenant databases are down, set the ALLOW_FILE_BASED_BACKUP_IFINACTIVE_TENANTS_PRESENT parameter to YES in the HANA properties file using
Set-SmConfigSettings
cmdlet.The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide
-
For pre and post commands for quiesce, Snapshot, and unquiesce operations, you should check if the commands exist in the command list available on the plug-in host from the following paths:
-
Default location on the Windows host: C:\Program Files\NetApp\SnapCenter\Snapcenter Plug-in Creator\etc\allowed_commands.config
-
Default location on the Linux host: /opt/NetApp/snapcenter/scc/etc/allowed_commands.config
-
If the commands do not exist in the command list, then the operation will fail. |
-
In the left navigation pane, select Resources, and then select the appropriate plug-in from the list.
-
In the Resource page, filter resources from the View drop-down list based on resource type.
Select , and then select the host name and the resource type to filter the resources. You can then select to close the filter pane.
-
Select the resource that you want to back up.
-
In the Resource page, select Use custom name format for Snapshot copy, and then enter a custom name format that you want to use for the Snapshot name.
For example, customtext_policy_hostname or resource_hostname. By default, a timestamp is appended to the Snapshot name.
-
In the Application Settings page, do the following:
-
Select the Backups arrow to set additional backup options:
Enable consistency group backup, if needed, and perform the following tasks:
For this field… Do this… Afford time to wait for "Consistency Group Snapshot" operation to complete
Select Urgent, or Medium, or Relaxed to specify the wait time for Snapshot operation to finish. Urgent = 5 seconds, Medium = 7 seconds, and Relaxed = 20 seconds.
Disable WAFL Sync
Select this to avoid forcing a WAFL consistency point.
-
Select the Scripts arrow to run pre and post commands for quiesce, Snapshot, and unquiesce operations.
You can also run pre commands before exiting the backup operation. Prescripts and postscripts are run in the SnapCenter Server.
-
Select the Custom Configurationsarrow, and then enter the custom value pairs required for all jobs using this resource.
-
Select the Snapshot Copy Tool arrow to select the tool to create Snapshots:
If you want… Then… SnapCenter to create a storage-level Snapshot
Select SnapCenter without File System Consistency.
SnapCenter to use the plug-in for Windows to put the file system into a consistent state and then create a Snapshot
Select SnapCenter with File System Consistency.
To enter the command to create a Snapshot
Select Other, and then enter the command to create a Snapshot.
-
-
In the Policies page, perform the following steps:
-
Select one or more policies from the drop-down list.
You can also create a policy by clicking . In the Configure schedules for selected policies section, the selected policies are listed.
-
Select in the Configure Schedules column for the policy for which you want to configure a schedule.
-
In the Add schedules for policy policy_name dialog box, configure the schedule, and then select OK.
policy_name is the name of the policy that you selected.
The configured schedules are listed in the Applied Schedules column.
-
-
In the Notification page, from the Email preference drop-down list, select the scenarios in which you want to send the emails.
You must also specify the sender and receiver email addresses, and the subject of the email. SMTP must also be configured in Settings > Global Settings.
-
Review the summary, and then select Finish.
The resources topology page is displayed.
-
Select Back up Now.
-
In the Backup page, perform the following steps:
-
If you applied multiple policies to the resource, from the Policy drop-down list, select the policy that you want to use for backup.
If the policy selected for the on-demand backup is associated with a backup schedule, the on-demand backups will be retained based on the retention settings specified for the schedule type.
-
Select Backup.
-
-
Monitor the operation progress by clicking Monitor > Jobs.
-
In MetroCluster configurations, SnapCenter might not be able to detect a protection relationship after a failover.
For information, see: Unable to detect SnapMirror or SnapVault relationship after MetroCluster failover
-
If you are backing up application data on VMDKs and the Java heap size for the SnapCenter Plug-in for VMware vSphere is not large enough, the backup might fail.
To increase the Java heap size, locate the script file /opt/netapp/init_scripts/scvservice. In that script, the do_start method command starts the SnapCenter VMware plug-in service. Update that command to the following: Java -jar -Xmx8192M -Xms4096M
-
-
Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
Open-smconnection -SMSbaseurl https:\\snapctr.demo.netapp.com:8146\
The username and password prompt is displayed.
-
Add resources by using the Add-SmResources cmdlet.
This example shows how to add a SAP HANA database of SingleContainer type:
C:\PS> Add-SmResource -HostName '10.232.204.42' -PluginCode 'HANA' -DatabaseName H10 -ResourceType SingleContainer -StorageFootPrint (@{"VolumeName"="HanaData10";"StorageSystem"="vserver_scauto_primary"}) -SID 'H10' -filebackuppath '/tmp/HanaFileLog' -userstorekeys 'HS10' -osdbuser 'h10adm' -filebackupprefix 'H10_'
This example shows how to add a SAP HANA database of MultipleContainers type:
C:\PS> Add-SmResource -HostName 'vp-hana2.gdl.englab.netapp.com' -PluginCode 'HANA' -DatabaseName MDC_MT -ResourceType MultipleContainers -StorageFootPrint (@{"VolumeName"="VP_HANA2_data";"StorageSystem"="buck.gdl.englab.netapp.com"}) -sid 'A12' -userstorekeys 'A12KEY' -TenantType 'MultiTenant'
This example shows how to create a non-data volume resource:
C:\PS> Add-SmResource -HostName 'SNAPCENTERN42.sccore.test.com' -PluginCode 'hana' -ResourceName NonDataVolume -ResourceType NonDataVolume -StorageFootPrint (@{"VolumeName"="ng_pvol";"StorageSystem"="vserver_scauto_primary"}) -sid 'S10'
-
Create a backup policy by using the Add-SmPolicy cmdlet.
This example creates a backup policy for a Snapshot copy-based backup:
C:\PS> Add-SmPolicy -PolicyName hana_snapshotbased -PolicyType Backup -PluginPolicyType hana -BackupType SnapShotBasedBackup
This example creates a backup policy for a File-Based backup:
C:\PS> Add-SmPolicy -PolicyName hana_Filebased -PolicyType Backup -PluginPolicyType hana -BackupType FileBasedBackup
-
Protect the resource or add a new resource group to SnapCenter by using the Add-SmResourceGroup cmdlet.
This example protects a single container resource:
C:\PS> Add-SmProtectResource -PluginCode HANA -Policies hana_snapshotbased,hana_Filebased -Resources @{"Host"="host.example.com";"UID"="SID"} -Description test -usesnapcenterwithoutfilesystemconsistency
This example protects a multiple containers resource:
C:\PS> Add-SmProtectResource -PluginCode HANA -Policies hana_snapshotbased,hana_Filebased -Resources @{"Host"="host.example.com";"UID"="MDC\SID"} -Description test -usesnapcenterwithoutfilesystemconsistency
This example creates a new resource group with the specified policy and resources:
C:\PS> Add-SmResourceGroup -ResourceGroupName 'ResourceGroup_with_SingleContainer_MultipleContainers_Resources' -Resources @(@{"Host"="sccorelinux61.sccore.test.com";"Uid"="SID"},@{"Host"="sccorelinux62.sccore.test.com";"Uid"="MDC\SID"}) -Policies hana_snapshotbased,hana_Filebased -usesnapcenterwithoutfilesystemconsistency -plugincode 'HANA'
This example creates a non-data volume resource group:
C:\PS> Add-SmResourceGroup -ResourceGroupName 'Mixed_RG_backup_when_Remove_Backup_throguh_BackupName_windows' -Resources @(@{"Host"="SNAPCENTERN42.sccore.test.com";"Uid"="H11";"PluginName"="hana"},@{"Host"="SNAPCENTERN42.sccore.test.com";"Uid"="MDC\H31";"PluginName"="hana"},@{"Host"="SNAPCENTERN42.sccore.test.com";"Uid"="NonDataVolume\S10\NonDataVolume";"PluginName"="hana"}) -Policies hanaprimary
-
Initiate a new backup job by using the New-SmBackup cmdlet.
This example shows how to backup a resource group:
C:\PS> New-SMBackup -ResourceGroupName 'ResourceGroup_with_SingleContainer_MultipleContainers_Resources' -Policy hana_snapshotbased
This example backs up a protected resource:
C:\PS> New-SMBackup -Resources @{"Host"="10.232.204.42";"Uid"="MDC\SID";"PluginName"="hana"} -Policy hana_Filebased
-
Monitor the job status (running, completed, or failed) by using the Get-smJobSummaryReport cmdlet.
PS C:\> Get-smJobSummaryReport -JobID 123
-
Monitor the backup job details like backup ID, backup name to perform restore or clone operation by using the Get-SmBackupReport cmdlet.
PS C:\> Get-SmBackupReport -JobId 351 Output: BackedUpObjects : {DB1} FailedObjects : {} IsScheduled : False HasMetadata : False SmBackupId : 269 SmJobId : 2361 StartDateTime : 10/4/2016 11:20:45 PM EndDateTime : 10/4/2016 11:21:32 PM Duration : 00:00:46.2536470 CreatedDateTime : 10/4/2016 11:21:09 PM Status : Completed ProtectionGroupName : Verify_ASUP_Message_windows SmProtectionGroupId : 211 PolicyName : test2 SmPolicyId : 20 BackupName : Verify_ASUP_Message_windows_scc54_10-04-2016_23.20.46.2758 VerificationStatus : NotVerified VerificationStatuses : SmJobError : BackupType : SCC_BACKUP CatalogingStatus : NotApplicable CatalogingStatuses : ReportDataCreatedDateTime :
The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide.