Create a policy
To create a policy inside Horizon do the following steps:
- On the Horizon console, navigate to NBOS Backups > Policies.
- Click Create Policy.
- On the Details tab, Provide the policy name, description, and the policy type as Serial or Parallel.
- On the Policy Members tab, select the VMs to protect.
- On the Schedule tab, Click Enable Scheduler to schedule the backups.
In the schedule, provide the start date, end date, start time, and the number of hours the backup must repeat.
- Provide the Retention policy on the Policy Attributes tab.
- Choose the Full Backup Interval on the Policy Attributes tab.
- If required, select Pause VM on the Options tab.
- Click Create.
The created policy will be available after a few seconds and starts to take backups according to the provided schedule and policy.
nbosjm policy-create --instance <instance-id=instance-uuid>
[--display-name <display-name>]
[--display-description <display-description>]
[--policy-type-id <policy-type-id>]
[--source-platform <source-platform>]
[--jobschedule <key=key-name>]
[--metadata <key=key-name>]
[--policy-attribute-id <policy_attribute_id>]
--display-name Optional policy name. (Default=None)
--display-description Optional policy description. (Default=None)
--policy-type-id Policy Type ID is required
--source-platform Policy source platform is required. Supported platform is "openstack"
--instance Specify an instance to include in the policy. Specify option multiple times to include multiple instances. Instance-id: Include the instance with this UUID.
--jobschedule Specify following key value pairs for job schedule. Specify option multiple times to include multiple keys. "start_date" : "06/05/2014" "end_date" : "07/15/2014" "start_time" : "2:30 PM" "interval" : "1 hr" "snapshots_to_retain" : "2"
--metadata Specify a key value pair to include in the policy type metadata. Specify option multiple times to include multiple keys. key=value
--policy-attribute-id ID of the policy attribute to assign to the policy.