Skip to main content
SnapCenter 6.0 cmdlets

Add-SmResourceGroup

Contributors

Adds a resource group to SnapCenter.

Syntax

Add-SmResourceGroup [-ArchivedLocators]  <Hashtable[]>  [-ResourceGroupName]  <String>  [-BackupServers]  <SmBackupServer>  [-PluginCode]  <PluginCode>  [-EnableEmail]  <>  [-EmailPreference]  <SmEmailNotificationPreference>  [-isInternal]  <Boolean>

Detailed Description

Creates a new resource group. You can specify policies, schedules, verification schedules, and resources to be associated with the resource group.

Parameters

Name Description Required? Pipeline Input Default Value

ArchivedLocators

Specifies in a hashtable the secondary storage system details for each unique primary storage system resource in the resource group. For example:-ArchivedLocators @{Primary="my_vs1:my_vol_iscsi";Secondary="my_vs1:my_vol_iscsi_SECONDARY"}

false

true (ByPropertyName)

ResourceGroupName

Specifies the name of the resource group that you want create.

true

true (ByPropertyName)

BackupServers

false

true (ByPropertyName)

PluginCode

Specifies the plug-in code of the host for which you are creating a backup resource group. Valid values are SCSQL, SCW, and SCO.

true

true (ByPropertyName)

EnableEmail

Specifies whether to enable or disable email.

false

false

EmailPreference

Specifies when you will receive e-mail notifications.Possible values: Always, Never, OnError, OnErrorOrWarning.

false

false

isInternal

false

true (ByPropertyName)

Resources

Specifies the list of resources to be associated with the resource group.You must provide the resource information in a hashtable, and it must contain the resource name and type, and the host on which it is located. For example,@{"Host"="localhost";"Type"="SQL Database";"Names"="Instance\Database"}For instance-level backup @{"Host"="localhost";"Type"="SQL Instance";"Names"="Instance"}For availability group backup @{"Host"="localhost";"Type"="SQL Availability Group";"Names"="AG1"}For custom plug-in @{"Host"="sccorelinux61.sccore.test.com";"Uid"="inst1\db1"}Valid Type values are: SQL Database, SQL Instance, SQL Availability Group.You can include comma-separated values for Names. For Oracle Database, the format is @{"Host"="host.example.com";"Oracle Database"="db1,db2,.."}. For Oracle Application Volume, the format is @{"Host"="host.example.com";"Application Volume"="appVol1,appVol2,.."}.

true

true (ByPropertyName)

Description

Specifies an optional description for the new resource group.

false

true (ByPropertyName)

Tag

Enables you to apply a unique tag to help identify the resource group.

false

true (ByPropertyName)

Policies

Specifies the list of policies associated with the resource group. Multiple policies can be added as a comma-separated list.

false

true (ByPropertyName)

SchedulerCredentialName

false

true (ByPropertyName)

SchedulerInstance

Specifies the SQL Server Instance where the schedule is created and managed. This is mandatory if the policy has SQL scheduler enabled.

false

true (ByPropertyName)

VerificationServers

Specifies the list of verification servers to be associated with the resource group. Multiple verification servers can be added as a comma-separated list. This parameter is only required when you want to verify backups for SnapCenter Plug-in for Microsoft SQL Server resource groups.

false

true (ByPropertyName)

CustomSnapshotFormat

Specifies that you want to use a custom Snapshot copy naming format. By default, a timestamp is appended to the Snapshot copy name. Valid values for CustomSnapshotFormat are : $ResourceGroup, $Policy, $HostName, $ScheduleType, $CustomText

false

true (ByPropertyName)

CustomText

Specifies the custom text in the custom Snapshot copy naming format.

false

true (ByPropertyName)

DeleteBackupForDetachPolicies

false

true (ByPropertyName)

Schedules

Specifies the schedule parameters to be used in the resource group. Schedule parameters can include the policy name, schedule type, schedule start and end times. You can specify multiple schedules in a comma-separated list, for example:-Schedules @{"PolicyName"="BackupPolicy";"ScheduleType"="OneTime"}, @{"PolicyName"="BackupPolicy";"ScheduleType"="Hourly";"StartTime"=" 05/27/2016 6:13 PM";"EndTime"="05/27/2016 6:30 PM"}

false

true (ByPropertyName)

SchedulerType

Specifies the scheduler type. Possible values are Windows, SQL, None.

false

true (ByPropertyName)

VerificationSchedules

Specifies the verification schedules you want to add to the resource. The verification schedule includes the following parameters:"VerificationType" which defines if and when verification is performed. The following values are available:VERIFY_SCHEDULEDVERIFY_AFTER_BACKUPNONE"ScheduleType" represents the schedule type for the verification."BackupScheduleType" represents the schedule type for the backup-VerificationServers "WIN-DVGQDI73QR6" needs to be provided in the above command if we are creating verification enabled resource group for SCSQL plugin.

false

true (ByPropertyName)

BackupArchiveLogsAfterRecentMissingOne

This option is only valid for SCO plugin code. Specifies that you want to backup archive log files, which are created after the most recent missing archive log files and ignore the files created prior to it. If this option is not specified, then all archive log files except the missing archive log files are be backed up.

false

true (ByPropertyName)

ExcludeArchiveLogPathsFromBackup

This option is only valid for SCO plugin code. Specifies the archive log destinations to be excluded from backup. Archive log files present in the specified destinations will be excluded during log backup. Multiple entries can be specified using comma separated list. For example: -ExcludeArchiveLogPathsFromBackup '/arch/logs/on/local/disk1, /arch/logs/on/local/disk2'.

false

true (ByPropertyName)

ConsistencyGroupSnapshot

false

true (ByPropertyName)

ConsistencyGroupWaflSync

false

true (ByPropertyName)

ConsistencyGroupTimeOut

false

true (ByPropertyName)

SnapShotCreateCommand

false

true (ByPropertyName)

UseFileSystemConsistentSnapshot

Specifies that you want to use file system consistent Snapshot copy.

false

true (ByPropertyName)

UseSnapcenterWithoutFileSystemConsistency

false

true (ByPropertyName)

PreAppQuiesceCmd

false

true (ByPropertyName)

PostAppQuiesceCmd

false

true (ByPropertyName)

AppQuiesceCmd

false

true (ByPropertyName)

AppUnQuiesceCmd

false

true (ByPropertyName)

PreAppUnQuiesceCmd

false

true (ByPropertyName)

PostAppUnQuiesceCmd

false

true (ByPropertyName)

PreExitCmd

false

true (ByPropertyName)

PreSnapshotCmd

false

true (ByPropertyName)

PostSnapshotCmd

false

true (ByPropertyName)

AppIgnoreError

false

true (ByPropertyName)

UseExternalSnapShot

false

true (ByPropertyName)

ExternalSnapshotRegex

false

true (ByPropertyName)

ConfigParams

false

true (ByPropertyName)

EmailBody

Specifies the body of the email.

false

true (ByPropertyName)

EmailFrom

Specifies the sender's email address.

true

true (ByPropertyName)

EmailTo

Specifies the recipient's email address.

true

true (ByPropertyName)

EmailSubject

Specifies the subject of the email.

true

true (ByPropertyName)

EnableEmailAttachment

false

true (ByPropertyName)

Examples

Example 1: Creating a new resource group

 Add-SmResourceGroup -ResourceGroupName DS26 -PluginCode SMSQL -Policies BackupPolicy -Resources @{"Host"="host.example.com";"Type"="SQL Database";"Names"="NB-MVA-DEV054\newdb"}
          -Description test -CustomSnapShotFomat abc -CustomText test -SchedulerRunAsName admin
          -Schedules @{"PolicyName"="BackupPolicy";"ScheduleType"="OneTime"}, @{"PolicyName"="BackupPolicy";"ScheduleType"="Hourly";"StartTime"=" 05/27/2016 6:13 PM";"EndTime"="'05/27/2016 6:30 PM'"}
          -SchedulerType Windows

This example syntax creates a new resource group.

Example 2: Adding a resource group for custom plugin with consistency group Snapshot copy enabled

 Add-SmResourceGroup -ResourceGroupName 'ResourceGroup_with_CG' -Resources @(@{"Host"="sccorelinux61.sccore.test.com";"Uid"="inst1\db1"},@{"Host"="sccorelinux61.sccore.test.com";"Uid"="inst1\db2"}) -Policies primaryonly -consistencygroupsnapshot 1 -usesnapcenterwithoutfilesystemconsistency  -plugincode 'DB2'

This example syntax creates a resource group of two DB2 databases with Consistency Group Snapshot copies enabled.

Example 3: Creating a resource group with scheduled verification

 Add-SmResourceGroup -ResourceGroupName DS26 -PluginCode SMSQL -Policies BackupPolicy -Resources @{"Host"="host.example.com";"Type"="SQL Database";"Names"="NB-MVA-DEV054\newdb"} -Description test -CustomSnapShotFomat abc -CustomText test -SchedulerRunAsName admin -Schedules @{"PolicyName"="BackupPolicy";"ScheduleType"="OneTime"}, @{"PolicyName"="BackupPolicy";"ScheduleType"="Hourly";"StartTime"=" 05/27/2016 6:13 PM";"EndTime"="'05/27/2016 6:30 PM'"} -SchedulerType Windows -VerificationSchedules @{"BackupScheduleType"="Hourly";"DeferredBackupCount"="1";"VerificationType"="VERIFY_SCHEDULED";"VerifyOnSecondary"="true";"BackupPolicyName"="BackupPolicy";"ScheduleType"="Weekly";"DaysOfTheWeek"="Monday";"StartTime"="20-Jul-16 6:42:12 PM";"EndTime"="25-Jul-16 6:42:12 PM"},@{"BackupScheduleType"="Daily";"DeferredBackupCount"="2";"VerificationType"="VERIFY_SCHEDULED";"VerifyOnSecondary"="false";"BackupPolicyName"="BackupPolicy";"ScheduleType"="Monthly";"StartTime"="20-Jul-16 6:42:12 PM";"EndTime"="25-Jul-16 6:42:12 PM";"MonthofTheYear"="March";"DaysoftheMonth"="15"} -ArchivedLocators @{Primary="test_vserver:vol_ash_test";Secondary="test_vserver:test_vserver_vol_ash_test_vault"}

This example syntax creates a new resource group with verification.

Example 4: Creating a resource group with scheduled verification and verification after backup

 Add-SmResourceGroup -ResourceGroupName RG27 -PluginCode SCO -Policies BackupPolicy -Resources @{"Host"="host.example.com";"Oracle Database"="newdb"} -Description test -CustomSnapShotFomat abc -CustomText test -SchedulerRunAsName admin -Schedules @{"PolicyName"="BackupPolicy";"ScheduleType"="Weekly";"DaysOfTheWeek"="Sunday"}, @{"PolicyName"="BackupPolicy";"ScheduleType"="Monthly";"StartTime"=" 05/27/2016 6:13 PM";"EndTime"="05/27/2016 6:30 PM";"MonthsofTheYear"="March";"DaysoftheMonth"="2"} -SchedulerType Windows -VerificationSchedules @{"BackupScheduleType"="Weekly";"DeferredBackupCount"="1";"VerificationType"="VERIFY_SCHEDULED";"VerifyOnSecondary"="true";"BackupPolicyName"="BackupPolicy";"ScheduleType"="Weekly";"DaysOfTheWeek"="Monday";"StartTime"="20-Jul-16 6:42:12 PM";"EndTime"="25-Jul-16 6:42:12 PM"},@{"BackupScheduleType"="Monthly";"DeferredBackupCount"="2";"VerificationType"="VERIFY_AFTER_BACKUP";"VerifyOnSecondary"="false";"BackupPolicyName"="BackupPolicy"}

This example syntax creates a new resource group with scheduled verification and verification after backup.

Example 5: Adding an Always On availability group

 Add-SmResourceGroup -ResourceGroupName AG_Prod -Resources @{"Host"="myag1";"Type"="SQL Availability Group";"Names"="AG_Prod"} -PluginCode SMSQL -Policies "SQL Daily Full" -Schedules @{"PolicyName"="SQL Daily Full";"ScheduleType"="Daily";"StartTime"="10/28/2017 6:13 PM";"EndTime"=""} -schedulerType SQL -SchedulerInstance SQL1

This example syntax adds an Always On availability group named AG_Prod to a SnapCenter resource group.

Example 6: Adding a resource group for HANA plugin

 Add-SmResourceGroup -ResourceGroupName '43RG57' -Resources @{"Host"="schana02.gdl.englab.netapp.com";"Uid"="MDC\R57"} -plugincode 'hana' -Policies 'HANAPOLICY'

This example adds a resource group for HANA plug-in.

Tag :
ByPassRunAs : False
Configuration   : SMCoreContracts.SmConfiguration
CreationTime: 02-Oct-19 21:38:06
CustomSnapshotFormat:
CustomText  :
Description :
EmailBody   :
EmailFrom   :
EmailNotificationPreference :
EmailSMTPServer :
EmailSubject:
EmailTo :
EnableAsupOnFailure :
EnableEmail :
EnableSysLog:
HostResourceMaping  : {}
IsCustomSnapshot:
LastBackupStatus:
MaintenanceStatus   : Production
ModificationTime: 02-Oct-19 21:38:06
PluginProtectionGroupTypes  : {hana}
Policies: {}
ProtectionGroupType : Backup
SchedulerSQLInstance:
SearchResources : False
VerificationServer  :
VerificationServerInfo  : SMCoreContracts.SmVerificationServerInfo
Name: 43RG57
Type: Group
Id  : 1
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0
Hosts   : {}
StorageName :
ResourceGroupNames  :
PolicyNames :
Key : 0
NsmObjectID : 0
SizeOfSmObject  :

Example 6: Creating a resource group and attaching hourly backup policy

 Add-SmResourceGroup -ResourceGroupName ResourceGroup1 -Description test -Resources @{"Host"="C226030161613-1";"Type"="SQL Database";"Names"="C226030161613-1\NAMEDINST1\C226030161613_1_SDML_1"} -Policies Full_Backup_Log_Backup_Windows_Schedule_Policy_54615264 -schedulertype 'Windows' -plugincode 'SCSQL' -schedules @{"PolicyName"="Hourly_Full_log_Backup_Wtih_Ver_Policy_09959383";"StartTime"="05/21/2019 7:54 PM";"EndTime"="05/21/2019 8:03 PM";"ScheduleType"="Hourly";"RepeatTask_Every_Hour"="03:00"}

Example 7: Creating a resource group and attaching daily backup policy

 Add-SmResourceGroup -ResourceGroupName ResourceGroup1 -Description 'Backup ResourceGroup with Full and log backup policy with Daily SQL schedule' -Resources @{"Host"="C226030161613-1";"Type"="SQL Database";"Names"="C226030161613-1\NAMEDINST1\C226030161613_1_SDML_1"} -Policies Full_Backup_Log_Backup_SQL_Schedule_Policy_54615264 -schedulerinstance 'C226030161613-1\NAMEDINST1' -plugincode 'SCSQL' -schedulerrunasname 'DomainRunAs_54615264' -schedulertype 'SQL' -schedules @{"PolicyName"="Daily_Full_Log_Backup_With_Ver_Policy_09959383";"StartTime"="05/21/2019 8:09 PM";"EndTime"="05/21/2019 9:18 PM";"ScheduleType"="Daily";"daysInterval"="1"}

Example 8: Creating a resource group and attaching weekly backup policy

 Add-SmResourceGroup -ResourceGroupName ResourceGroup1 -Description 'Backup ResourceGroup with Full and log backup policy with hourly windows schedule' -Resources @{"Host"="C226030161613-1";"Type"="SQL Database";"Names"="C226030161613-1\NAMEDINST1\C226030161613_1_SDML_1"} -Policies Full_Backup_Log_Backup_Windows_Schedule_Policy_54615264 -schedulertype 'Windows' -plugincode 'SCSQL' -schedules @{"PolicyName"="Weekly_Full_Backup_With_Ver_Policy_09959383";"StartTime"="05/21/2019 8:24 PM";"EndTime"="05/21/2019 8:41 PM";"ScheduleType"="Weekly";"DaysOfTheWeek"="Tuesday"}

Example 9: Creating a resource group and attaching monthly backup policy

 Add-SmResourceGroup -ResourceGroupName ResourceGroup1 -Description 'Backup ResourceGroup with Full and log backup policy with hourly windows schedule' -Resources @{"Host"="C226030161613-1";"Type"="SQL Database";"Names"="C226030161613-1\NAMEDINST1\C226030161613_1_SDML_1"} -Policies Full_Backup_Log_Backup_Windows_Schedule_Policy_54615264 -schedulertype 'Windows' -plugincode 'SCSQL' -schedules @{"PolicyName"="Monthly_Full_Backup_With_Ver_Policy_09959383";"StartTime"="05/21/2019 8:51 PM";"EndTime"="05/21/2019 9:18 PM";"ScheduleType"="Monthly";"MonthsOfTheYear"="May,June";"daysOfTheMonth"="21,26,16"}

Example 10: Creating a new resource group in SCE plugin

 Add-SmResourceGroup -ResourceGroupName RGName -Description test -Policies BackupPolicy -backupservers replicaServers -plugincode SCE -Resources @{"Host"="host.example.com";"Type"="SnapCenter Plug-in for Microsoft Exchange Server";"Names"="host.example.com4\newdb"}

Example 11: Creating a new resource group for Oracle Plug-in

 Add-SmResourceGroup -ResourceGroupName 'mixedRG' -Resources @(@{"Host"="R809278EA03V1.HNK2.com";"Oracle Database"="DB11,DB12"},@{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol1,appVol2"}) -plugincode 'SCO' -Policies 'testPolicy'

This example syntax creates a new resource group for Oracle Plug-in containing database and application volume resources.

Example 12: Creating a new resource group for Oracle Plug-in

 Add-SmResourceGroup -ResourceGroupName 'appVolRG' -Resources @{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol1,appVol2"} -plugincode 'SCO' -Policies 'testPolicy'

This example syntax creates a new resource group for Oracle Plug-in with only application volume resources.

Example 6: Adding a resource group for UnixFileSystems plugin

 Add-SmResourceGroup -ResourceGroupName 'RG_PS_linuxfs201_LVM1_12648' -Resources @{"Host"="linuxfs201.gdl.englab.netapp.com";"Type"="UnixFileSystems";Uid"="/netapp/VGNFS1/LVM1"} -plugincode 'UnixFileSystems' -Policies 'BackupPS_linuxfs201_LVM1_12648'

This example adds a resource group for UnixFileSystems plug-in.

			Tag :
			ByPassRunAs : False
			Configuration   : SMCoreContracts.SmConfiguration
			CreationTime: 12/12/2023 8:29:30 AM
			CustomSnapshotFormat:
			CustomText  :
			Description : Creating Resource Group
			EmailBody   :
			EmailFrom   :
			EmailNotificationPreference :
			EmailSMTPServer :
			EmailSubject:
			EmailTo :
			EnableAsupOnFailure :
			EnableEmail :
			EnableSysLog:
			HostResourceMaping  : {}
			IsCustomSnapshot:
			LastBackupStatus:
			MaintenanceStatus   : Production
			ModificationTime: 12/12/2023 8:29:30 AM
			PluginProtectionGroupTypes  : {UnixFileSystems}
			Policies: {}
			ProtectionGroupType : Backup
			SchedulerSQLInstance:
			SearchResources : False
			VerificationServer  :
			VerificationServerInfo  : SMCoreContracts.SmVerificationServerInfo
			Name: RG_PS_linuxfs201_LVM1_12648
			Type: Group
			Id  : 173
			Host:
			UserName:
			Passphrase  :
			Deleted : False
			Auth: SMCoreContracts.SmAuth
			IsClone : False
			CloneLevel  : 0
			Hosts   : {}
			StorageName :
			ResourceGroupNames  :
			PolicyNames :
			Key : 0
			NsmObjectID : 0
			SizeOfSmObject  :