Skip to main content
SnapCenter 5.0 cmdlets

Set-SmProtectResource

Contributors

Modifies policies and schedules of the resource.

Syntax

Set-SmProtectResource [-ArchivedLocators]  <Hashtable[]>  [-PluginCode]  <PluginCode>  [-EnableEmail]  <>  [-EmailPreference]  <SmEmailNotificationPreference>  [-RemoveCustomSnapShot]  <>

Detailed Description

Modifies policies and schedules of the resource.

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)

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

RemoveCustomSnapShot

Specifies removal of the custom naming format of theSnapshot copy.

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)

Resources

Specifies the resource you want to protect. You mustprovide the resource information in a key value format, and itmustcontain the resource name, type, and the host on which it islocated.For example, -Resource@{"Host"="host.example.com";"Type"="SQL Database";"Names"="NB-MVA-DEV054\newdb"} For Oracle Database, the format is -Resources @{"Host"="host.example.com";"Oracle Database"="db"}. For Oracle Application Volume, the format is -Resources @{"Host"="host.example.com";"Application Volume"="appVol"}.

true

true (ByPropertyName)

Description

Modifies policies and schedules of the resource.

false

true (ByPropertyName)

Tag

Enables you to apply a unique tag to help identify the resources.

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.Example:-VerificationSchedules @{"BackupScheduleType"="Hourly";"DeferredBackupCount"="1";"VerificationType"="VERIFY_SCHEDULED";"VerifyOnSecondary"="true";"BackupPolicyName"="sco_20july";"ScheduleType"="Weekly";"DaysOfTheWeek"="Monday";"StartTime"="20-Jul-16 6:42:12 PM";"EndTime"="25-Jul-16 6:42:12 PM"}

false

true (ByPropertyName)

ConsistencyGroupSnapshot

false

true (ByPropertyName)

ConsistencyGroupWaflSync

false

true (ByPropertyName)

ConsistencyGroupTimeOut

false

true (ByPropertyName)

SnapShotCreateCommand

false

true (ByPropertyName)

UseFileSystemConsistentSnapshot

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)

Examples

Example 1: Modifying the Protection of a resource

 Set-SmProtectResource -PluginCode SCSQL  -Policies BackupPolicy -Resources @{"Host"="host.example.com";"Type"="SQL Database";"Names"="NB-MVA-DEV054\newdb"} -Description "The protection of the resource is modified"
          -EnableAsupOnFailure

This example syntax modifies the protection of a resource.

Example 2

 Set-SmProtectResource -Resources @(@{"Host"="sccorelinux188.sccore.test.com";"Uid"="Set_CG_Timeout6";"Type"="Instance";"Names"="Set_CG_Timeout6"}) -PluginCode 'DummyPlugin' -consistencygrouptimeout 'Medium'

Example 3: Enable email during protecting resource

 Set-SmProtectResource -PluginCode 'HANA' -Resources @{"Host"="hanahost01.testlab.netapp.com";"Uid"="MDC\R71"}
         -EnableEmail -EmailPreference OnErrorOrWarning -EmailFrom 'snapcenter@netapp.com' -EmailTo 'backupteam@netapp.com' -EmailSubject 'SnapCenter HANA Backup Failure'

This example syntax enables email notification during the protection of a HANA resource.

Example 4: Modifying the Protection of an Oracle Application Volume resource

 Set-SmProtectResource -PluginCode SCO  -Policies "appVolPolicyModified" -Resources @{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol"} -Description "protection is modified"

This example syntax modifies the protection policy of an Oracle application volume resource.