Data Backup and Recovery

4.1c assign multiple policies from cli

clilescapario
3,127 Views

Since the GUI seems to be bugged and does not show the "action" buttons under any of the policy tabs for my SC 4.1c install, I have taken the liberty of consulting the cli help and see that it is possible to assign a policy to a profile. In my setup I am trying to setup multiple policies for something like hourly, daily, weekly, monthly. policyAssignProfile action works well, but it will remove any existing policy.

Example is:

$ ./snapcreator --action policyAssignProfile --profile VMware --policyName Every_Day_Backup_Mirror --verbose

[Fri Dec  6 16:15:21 2013] INFO: REPO-04404: All queries matched for profile [VMware] config [dev]
[Fri Dec  6 16:15:21 2013] INFO: REPO-04404: All queries matched for profile [VMware] config [stage]
[Fri Dec  6 16:15:21 2013] INFO: REPO-04404: All queries matched for profile [VMware] config [qa]
[Fri Dec  6 16:15:21 2013] INFO: REPO-04400: Query configs for profile [VMware] finished successfully
There are currently configurations with local retention policies specified in this profile.
Applying a Policy Object to this profile will overrule any policy settings in the configuration file(s).
Are you sure you want to continue (y|n)? y
[Fri Dec  6 16:15:35 2013] INFO: Attaching policies [Every_Day_Backup_Mirror] to profile VMware
[Fri Dec  6 16:15:35 2013] INFO: Updating profile golobal with new policy list
[Fri Dec  6 16:15:35 2013] INFO: Profile global for profile VMware does not exitst. Creating new profile global config
[Fri Dec  6 16:15:35 2013] INFO: Attaching policies [Every_Day_Backup_Mirror] to profile VMware finished successfully

At this point the policy is assigned and the schedules have been built, now try to add the hourly policy.

$ ./snapcreator --action policyAssignProfile --profile VMware --policyName Hourly_Backup --verbose
 
[Fri Dec  6 16:24:13 2013] INFO: REPO-04400: Query configs for profile [VMware] finished successfully
[Fri Dec  6 16:24:14 2013] INFO: Attaching policies [Hourly_Backup] to profile VMware
[Fri Dec  6 16:24:14 2013] INFO: Updating profile golobal with new policy list
[Fri Dec  6 16:24:14 2013] INFO: Attaching policies [Hourly_Backup] to profile VMware finished successfully

At this point the 1st policy is no longer assigned

Am I doing something wrong?

Thanks

--

Chris

4 REPLIES 4

ktenzer
3,127 Views

Hi Chris,

Everytime you run policyAssignProfile it will update the policies meaning what you had before is overwritten. There is a CLI bug to allow more than one policy to be assigned and this will be fixed in SC 4.1 release.

Thanks for bringing this issue to our attention.

Workaround is to update policies manually in profile/global.conf and in config via the NTAP_SNAPSHOT_POLICIES parameter.

Keith

clilescapario
3,127 Views

That works, but the schedules are not built.

ktenzer
3,127 Views

the schedules are created separately and added to policy it has nothing to do with policy assignments.

Keith

clilescapario
3,127 Views

I should have been more clear. I mean the schedules that are already defined in the second policy.

The workaround assigns the second policy to a profile, but the schedules defined in that second policy are not built (don't show up under the scheduler tab).

Thanks again,

--

Chris

Public