mksnapshotpolicy

Use the mksnapshotpolicy command to create a new snapshot policy that can be associated with volume groups.

Syntax

Read syntax diagramSkip visual syntax diagram mksnapshotpolicy -name snapshot_policy_name -backupunit minutehourdayweekmonth -backupinterval interval_value -backupstarttime start_time -retentiondays num_days -type localsnapshotcloudbackup

Parameters

-name snapshot_policy_name
(Optional) Indicates a unique name for the snapshot policy. If name is not specified then a unique name will be generated and assigned to the snapshot policy object.
-backupunit minute | hour | day | month | year
(Required) Specifies the unit of time of the backup interval.
-backupinterval interval_value
(Required) Indicates the interval between snapshot backups. The value must be an integer (1 - 65535).
-backupstarttime start_time
(Required) Specifies when the first snapshot backup is to be taken. The backup_start_time parameter is displayed in the standard YYMMDDHHMM format. where: Y is year (The first) M is month D is day H is hour (The second) M is minute.
-retentiondays num_days
(Required) Specifies the number of days to keep the snapshot backup. The value must be an integer (1 - 365).
-type localsnapshot | cloudbackup
(Optional) Specifies the type of schedule being created. By default, the type is localsnapshot.

If the backup start time is in the past it will be advanced according to the backup interval until a time in the future is reached. User defined snapshot policies will have IDs that start following those of the predefined snapshot policies. User can defined maximum of 29 snapshot policies. Monthly scheduled snapshot will create snapshot on the same day of each month for days 1-28 based on the start time. If day is not available in that month, the last day of the month will be considered

For example, if snapshot policy is specified for every month and start date is May 31, the next snapshot date would be June 30, followed by August 31. Daylight savings will not affect the backup and retention intervals specified by the schedule. For example, if snapshots are triggered every 24 hours and occur every day at 2:00 AM before daylight savings start, they will be created at 1:00 AM when daylight savings pushes the time ahead one hour. The backup interval will remains constants at 24 hours in this example.

An invocation example

The following example creates a snapshot policy that, by default, generates a local snapshot every day and retains the local snapshot for 15 days with start time 2102281800

mksnapshotpolicy -backupunit day -backupinterval 1 -backupstarttime 2102281800 -retentiondays 15

The resulting output:

snapshot Policy, id[3], successfully created