Bulk addition of policies
Zmanda Pro allows configuring policies which enforce custom settings on specific users. These settings are related to the resources that the Zmanda Pro user can configure, like the Storage Vaults, Protected Items, retentions, etc.
ZPAT provides functionality for bulk creation of policies. The policies can be edited from the Zmanda Pro Server UI
Base Requirements
An instance of self-hosted Zmanda Pro Server
The
add-policies.csv
configuredAdmin credentials to access your server
CSV Configuration
Header
Description
1
PolicyName
string
Name for the policy being created, case-sensitive field
2
CreatePausedPolicy
bool
For the same policy being created, it creates a duplicate with "_paused" suffix and no schedules. This can be useful when you want to maintain an identical policy configuration but without any active backup schedules.
3
PolicyJSON
string
Instructions for adding policies to a ZmandaPro instance
Open ZmandaPro in Chrome.
Right click the page and click on Inspect.
Open the Network tab.
In ZmandaPro, click on Edit on your required policy and make the changes you need.
Click 'Save Policy'.
In the 'Network' tab, click the item 'list-full'.
In the 'Response' tab, find the json for your policy and copy the policy.
{ "Description": "Default-Policy", "OrganizationID": "3ad661d9-c1f2-4453-8250-25c61086000f", ... "CreatedDate": 0, "ModifiedDate": 1722957112 }
NOTE: The Description will be overwritten by the PolicyName you provide in the csv and OrganizationId will be automatically set so you can delete both.
Open NotePad++ and paste your policy
Enter Ctrl+j
Hit Ctrl+h,
In 'Find what', type spacebar
In 'Replace with', make sure it's empty
Copy this string and paste it in the PolicyJSON part of the add-policies.csv
You can clone you policies by clicking the "..." at the end of the Policy and clicking 'Copy'.
Then click 'Add Policy...'
Then click 'Actions' -> 'Paste'
Change the Policy name to a new name.
Finally click 'Create Policy' to create your new policy.
14. Now you can edit the newly created policy and change the sections of the policy as needed and then click 'Save Policy'.
15. Every policy has a _paused version. You can assign the paused version of the policy to temporarily pause the schedules.
Command Execution
Refer Common flags here.
Last updated
Was this helpful?