# pool.snapshottask.create

Create a Periodic Snapshot Task

Create a Periodic Snapshot Task that will take snapshots of specified dataset at specified schedule. Recursive snapshots can be created if recursive flag is enabled. You can exclude specific child datasets or zvols from the snapshot.

Snapshots will be automatically destroyed after a certain amount of time, specified by lifetime_value and lifetime_unit.

If multiple periodic tasks create snapshots at the same time (for example hourly and daily at 00:00) the snapshot will be kept until the last of these tasks reaches its expiry time.

Snapshots will be named according to naming_schema which is a strftime-like template for snapshot name and must contain %Y, %m, %d, %H and %M.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: data

#### data

Type: object

Configuration for the new periodic snapshot task.

No Additional Properties

##

#### Dataset

Type: string

The dataset to take snapshots of.

##

#### Recursive

Type: boolean Default: false

Whether to recursively snapshot child datasets.

##

#### Lifetime Value

Type: integer Default: 2

Number of time units to retain snapshots. `lifetime_unit` gives the time unit.

##

#### Lifetime Unit

Type: enum (of string) Default: "WEEK"

Unit of time for snapshot retention.

##### Must be one of:

- "HOUR"
- "DAY"
- "WEEK"
- "MONTH"
- "YEAR"

##

#### Enabled

Type: boolean Default: true

Whether this periodic snapshot task is enabled.

##

#### Exclude

Type: array of string Default: []

Array of dataset patterns to exclude from recursive snapshots.

No Additional Items

##### Each item of this array must be:

Type: string

##

#### Naming Schema

Type: string Default: "auto-%Y-%m-%d_%H-%M"

Naming pattern for generated snapshots using strftime format.

##

#### Allow Empty

Type: boolean Default: true

Whether to take snapshots even if no data has changed.

##

#### PoolSnapshotTaskCron

Type: object

Cron schedule for when snapshots should be taken.

No Additional Properties

##

#### Minute

Type: string Default: "00"

Minute when snapshots should be taken (cron format).

##

#### Hour

Type: string Default: "*"

"00" - "23"

##

#### Dom

Type: string Default: "*"

"1" - "31"

##

#### Month

Type: string Default: "*"

"1" (January) - "12" (December)

##

#### Dow

Type: string Default: "*"

"1" (Monday) - "7" (Sunday)

##

#### Begin

Type: string Default: "00:00"

Start time of the window when snapshots can be taken.

Examples:

    "00:00"

    "06:30"

    "18:00"

    "23:00"

##

#### End

Type: string Default: "23:59"

End time of the window when snapshots can be taken.

Examples:

    "00:00"

    "06:30"

    "18:00"

    "23:00"

##

#### PeriodicSnapshotTaskEntry

Type: object

The newly created periodic snapshot task configuration.

No Additional Properties

##

#### Dataset

Type: string

The dataset to take snapshots of.

##

#### Recursive

Type: boolean Default: false

Whether to recursively snapshot child datasets.

##

#### Lifetime Value

Type: integer Default: 2

Number of time units to retain snapshots. `lifetime_unit` gives the time unit.

##

#### Lifetime Unit

Type: enum (of string) Default: "WEEK"

Unit of time for snapshot retention.

##### Must be one of:

- "HOUR"
- "DAY"
- "WEEK"
- "MONTH"
- "YEAR"

##

#### Enabled

Type: boolean Default: true

Whether this periodic snapshot task is enabled.

##

#### Exclude

Type: array of string Default: []

Array of dataset patterns to exclude from recursive snapshots.

No Additional Items

##### Each item of this array must be:

Type: string

##

#### Naming Schema

Type: string Default: "auto-%Y-%m-%d_%H-%M"

Naming pattern for generated snapshots using strftime format.

##

#### Allow Empty

Type: boolean Default: true

Whether to take snapshots even if no data has changed.

##

#### PoolSnapshotTaskCron

Type: object

Cron schedule for when snapshots should be taken.

No Additional Properties

##

#### Minute

Type: string Default: "00"

Minute when snapshots should be taken (cron format).

##

#### Hour

Type: string Default: "*"

"00" - "23"

##

#### Dom

Type: string Default: "*"

"1" - "31"

##

#### Month

Type: string Default: "*"

"1" (January) - "12" (December)

##

#### Dow

Type: string Default: "*"

"1" (Monday) - "7" (Sunday)

##

#### Begin

Type: string Default: "00:00"

Start time of the window when snapshots can be taken.

Examples:

    "00:00"

    "06:30"

    "18:00"

    "23:00"

##

#### End

Type: string Default: "23:59"

End time of the window when snapshots can be taken.

Examples:

    "00:00"

    "06:30"

    "18:00"

    "23:00"

##

#### Id

Type: integer

Unique identifier for the periodic snapshot task.

##

#### State

Type: object

Detailed state information for the task.

##

#### Vmware Sync

Type: boolean

Whether VMware VMs are synced before taking snapshots.

Required roles: SNAPSHOT_TASK_WRITE