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

  1. An instance of self-hosted Zmanda Pro Server

  2. The add-policies.csv configured

  3. Admin 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

  1. Open ZmandaPro in Chrome.

  2. Right click the page and click on Inspect.

  3. Open the Network tab.

  4. In ZmandaPro, click on Edit on your required policy and make the changes you need.

  5. Click 'Save Policy'.

  6. In the 'Network' tab, click the item 'list-full'.

  7. 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.

  1. Open NotePad++ and paste your policy

  2. Enter Ctrl+j

  3. 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.

/opt/zmandapro/automations/zpat add-policies

Last updated

Was this helpful?