replication.update¶
Update a Replication Task with specific id.
No Additional Items
Tuple Validation
Parameter 1: id
id
Type: integerID of the replication task to update.
Parameter 2: replication_update
replication_update
Type: objectUpdated configuration for the replication task.
No Additional PropertiesName
Type: stringName for replication task.
Must be at least 1
characters long
Direction
Type: enum (of string)Whether task will PUSH
or PULL
snapshots.
Must be one of:
- "PUSH"
- "PULL"
Transport
Type: enum (of string)Method of snapshots transfer.
SSH
transfers snapshots via SSH connection. This method is supported everywhere but does not achieve great performance.SSH+NETCAT
uses unencrypted connection for data transfer. This can only be used in trusted networks and requires a port (specified by range fromnetcat_active_side_port_min
tonetcat_active_side_port_max
) to be open onnetcat_active_side
.LOCAL
replicates to or from localhost.
Must be one of:
- "SSH"
- "SSH+NETCAT"
- "LOCAL"
Ssh Credentials
Keychain Credential ID of type SSH_CREDENTIALS
.
Netcat Active Side
Which side actively establishes the netcat connection for SSH+NETCAT
transport.
LOCAL
: Local system initiates the connectionREMOTE
: Remote system initiates the connectionnull
: Not applicable for other transport types
Must be one of:
- "LOCAL"
- "REMOTE"
Netcat Active Side Listen Address
IP address for the active side to listen on for SSH+NETCAT
transport. null
if not applicable.
Netcat Active Side Port Min
Minimum port number in the range for netcat connections. null
if not applicable.
Value must be greater or equal to 1
and lesser or equal to 65535
Netcat Active Side Port Max
Maximum port number in the range for netcat connections. null
if not applicable.
Value must be greater or equal to 1
and lesser or equal to 65535
Netcat Passive Side Connect Address
IP address for the passive side to connect to for SSH+NETCAT
transport. null
if not applicable.
Sudo
Type: booleanSSH
and SSH+NETCAT
transports should use sudo (which is expected to be passwordless) to run zfs
command on the remote machine.
Source Datasets
Type: array of stringList of datasets to replicate snapshots from.
Must contain a minimum of 1
items
Each item of this array must be:
Target Dataset
Type: stringDataset to put snapshots into.
Recursive
Type: booleanWhether to recursively replicate child datasets.
Exclude
Type: array of stringArray of dataset patterns to exclude from replication.
No Additional ItemsEach item of this array must be:
Properties
Type: booleanSend dataset properties along with snapshots.
Properties Exclude
Type: array of stringArray of dataset property names to exclude from replication.
No Additional ItemsEach item of this array must be:
Must be at least 1
characters long
Properties Override
Type: objectObject mapping dataset property names to override values during replication.
Each additional property must conform to the following schema
Type: stringReplicate
Type: booleanWhether to use full ZFS replication.
Encryption
Type: booleanWhether to enable encryption for the replicated datasets.
Encryption Inherit
Whether replicated datasets should inherit encryption from parent. null
if encryption is disabled.
Encryption Key
Encryption key for replicated datasets. null
if not specified.
Encryption Key Format
Format of the encryption key.
HEX
: Hexadecimal-encoded keyPASSPHRASE
: Text passphrasenull
: Not applicable when encryption is disabled
Must be one of:
- "HEX"
- "PASSPHRASE"
Encryption Key Location
Filesystem path where encryption key is stored. null
if not using key file.
Periodic Snapshot Tasks
Type: array of integerList of periodic snapshot task IDs that are sources of snapshots for this replication task. Only push replication tasks can be bound to periodic snapshot tasks.
All items must be unique
No Additional ItemsEach item of this array must be:
Naming Schema
Type: array of stringList of naming schemas for pull replication.
No Additional ItemsEach item of this array must be:
Also Include Naming Schema
Type: array of stringList of naming schemas for push replication.
No Additional ItemsEach item of this array must be:
Name Regex
Replicate all snapshots which names match specified regular expression.
Must be at least 1
characters long
Auto
Type: booleanAllow replication to run automatically on schedule or after bound periodic snapshot task.
Schedule to run replication task. Only auto
replication tasks without bound periodic snapshot tasks can have a schedule.
ReplicationTimeCronModel
Type: objectNo Additional Properties
Minute
Type: string Default: "00""00" - "59"
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 for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
End
Type: string Default: "23:59"End time for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
Restricts when replication task with bound periodic snapshot tasks runs. For example, you can have periodic snapshot tasks that run every 15 minutes, but only run replication task every hour.
ReplicationTimeCronModel
Type: objectNo Additional Properties
Minute
Type: string Default: "00""00" - "59"
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 for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
End
Type: string Default: "23:59"End time for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
Only Matching Schedule
Type: booleanWill only replicate snapshots that match schedule
or restrict_schedule
.
Allow From Scratch
Type: booleanWill destroy all snapshots on target side and replicate everything from scratch if none of the snapshots on target side matches source snapshots.
Readonly
Type: enum (of string)Controls destination datasets readonly property.
SET
: Set all destination datasets to readonly=on after finishing the replication.REQUIRE
: Require all existing destination datasets to have readonly=on property.IGNORE
: Avoid this kind of behavior.
Must be one of:
- "SET"
- "REQUIRE"
- "IGNORE"
Hold Pending Snapshots
Type: booleanPrevent source snapshots from being deleted by retention of replication fails for some reason.
Retention Policy
Type: enum (of string)How to delete old snapshots on target side:
SOURCE
: Delete snapshots that are absent on source side.CUSTOM
: Delete snapshots that are older thanlifetime_value
andlifetime_unit
.NONE
: Do not delete any snapshots.
Must be one of:
- "SOURCE"
- "CUSTOM"
- "NONE"
Lifetime Value
Number of time units to retain snapshots for custom retention policy. Only applies when retention_policy
is CUSTOM.
Value must be greater or equal to 1
Lifetime Unit
Time unit for snapshot retention for custom retention policy. Only applies when retention_policy
is CUSTOM.
Must be one of:
- "HOUR"
- "DAY"
- "WEEK"
- "MONTH"
- "YEAR"
Lifetimes
Type: array of objectArray of different retention schedules with their own cron schedules and lifetime settings.
No Additional ItemsEach item of this array must be:
ReplicationLifetimeModel
Type: objectNo Additional Properties
CronModel
Type: objectCron schedule for when snapshot retention policies are applied.
No Additional PropertiesMinute
Type: string Default: "*""00" - "59"
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)
Lifetime Value
Type: integerNumber of time units to retain snapshots.
Value must be greater or equal to 1
Lifetime Unit
Type: enum (of string)Time unit for snapshot retention.
Must be one of:
- "HOUR"
- "DAY"
- "WEEK"
- "MONTH"
- "YEAR"
Compression
Compresses SSH stream. Available only for SSH transport.
Must be one of:
- "LZ4"
- "PIGZ"
- "PLZIP"
Speed Limit
Limits speed of SSH stream. Available only for SSH transport.
Value must be greater or equal to 1
Large Block
Type: booleanEnable large block support for ZFS send streams.
Embed
Type: booleanEnable embedded block support for ZFS send streams.
Compressed
Type: booleanEnable compressed ZFS send streams.
Retries
Type: integerNumber of retries before considering replication failed.
Value must be greater or equal to 1
Logging Level
Log level for replication task execution. Controls verbosity of replication logs.
Must be one of:
- "DEBUG"
- "INFO"
- "WARNING"
- "ERROR"
Enabled
Type: booleanWhether this replication task is enabled.
ReplicationEntry
Type: objectThe updated replication task configuration.
No Additional PropertiesId
Type: integerUnique identifier for this replication task.
Name
Type: stringName for replication task.
Must be at least 1
characters long
Direction
Type: enum (of string)Whether task will PUSH
or PULL
snapshots.
Must be one of:
- "PUSH"
- "PULL"
Transport
Type: enum (of string)Method of snapshots transfer.
SSH
transfers snapshots via SSH connection. This method is supported everywhere but does not achieve great performance.SSH+NETCAT
uses unencrypted connection for data transfer. This can only be used in trusted networks and requires a port (specified by range fromnetcat_active_side_port_min
tonetcat_active_side_port_max
) to be open onnetcat_active_side
.LOCAL
replicates to or from localhost.
Must be one of:
- "SSH"
- "SSH+NETCAT"
- "LOCAL"
Keychain Credential of type SSH_CREDENTIALS
.
KeychainCredentialEntry
Type: objectNo Additional Properties
Id
Type: integerUnique identifier for this keychain credential.
Name
Type: stringDistinguishes this Keychain Credential from others.
Must be at least 1
characters long
Type
Type: enum (of string)Type of credential stored in the keychain.
SSH_KEY_PAIR
: SSH public/private key pairSSH_CREDENTIALS
: SSH connection credentials including host and authentication
Must be one of:
- "SSH_KEY_PAIR"
- "SSH_CREDENTIALS"
Attributes
Credential-specific configuration and authentication data.
SSHKeyPair
Type: objectAt least one of the two keys must be provided on creation.
No Additional PropertiesPrivate Key
Default: nullSSH private key in OpenSSH format. null
if only public key is provided.
Public Key
Default: nullCan be omitted and automatically derived from the private key.
SSHCredentials
Type: objectNo Additional Properties
Host
Type: stringSSH server hostname or IP address.
Port
Type: integer Default: 22SSH server port number.
Username
Type: string Default: "root"SSH username for authentication.
Private Key
Type: integerKeychain Credential ID.
Remote Host Key
Type: stringCan be discovered with keychaincredential.remotesshhostkeyscan.
Connect Timeout
Type: integer Default: 10Connection timeout in seconds for SSH connections.
Netcat Active Side
Default: nullWhich side actively establishes the netcat connection for SSH+NETCAT
transport.
LOCAL
: Local system initiates the connectionREMOTE
: Remote system initiates the connectionnull
: Not applicable for other transport types
Must be one of:
- "LOCAL"
- "REMOTE"
Netcat Active Side Listen Address
Default: nullIP address for the active side to listen on for SSH+NETCAT
transport. null
if not applicable.
Netcat Active Side Port Min
Default: nullMinimum port number in the range for netcat connections. null
if not applicable.
Value must be greater or equal to 1
and lesser or equal to 65535
Netcat Active Side Port Max
Default: nullMaximum port number in the range for netcat connections. null
if not applicable.
Value must be greater or equal to 1
and lesser or equal to 65535
Netcat Passive Side Connect Address
Default: nullIP address for the passive side to connect to for SSH+NETCAT
transport. null
if not applicable.
Sudo
Type: boolean Default: falseSSH
and SSH+NETCAT
transports should use sudo (which is expected to be passwordless) to run zfs
command on the remote machine.
Source Datasets
Type: array of stringList of datasets to replicate snapshots from.
Must contain a minimum of 1
items
Each item of this array must be:
Target Dataset
Type: stringDataset to put snapshots into.
Recursive
Type: booleanWhether to recursively replicate child datasets.
Exclude
Type: array of string Default: []Array of dataset patterns to exclude from replication.
No Additional ItemsEach item of this array must be:
Properties
Type: boolean Default: trueSend dataset properties along with snapshots.
Properties Exclude
Type: array of string Default: []Array of dataset property names to exclude from replication.
No Additional ItemsEach item of this array must be:
Must be at least 1
characters long
Properties Override
Type: object Default: {}Object mapping dataset property names to override values during replication.
Each additional property must conform to the following schema
Type: stringReplicate
Type: boolean Default: falseWhether to use full ZFS replication.
Encryption
Type: boolean Default: falseWhether to enable encryption for the replicated datasets.
Encryption Inherit
Default: nullWhether replicated datasets should inherit encryption from parent. null
if encryption is disabled.
Encryption Key
Default: nullEncryption key for replicated datasets. null
if not specified.
Encryption Key Format
Default: nullFormat of the encryption key.
HEX
: Hexadecimal-encoded keyPASSPHRASE
: Text passphrasenull
: Not applicable when encryption is disabled
Must be one of:
- "HEX"
- "PASSPHRASE"
Encryption Key Location
Default: nullFilesystem path where encryption key is stored. null
if not using key file.
Periodic Snapshot Tasks
Type: array of objectList of periodic snapshot tasks that are sources of snapshots for this replication task. Only push replication tasks can be bound to periodic snapshot tasks.
No Additional ItemsEach item of this array must be:
PoolSnapshotTaskDBEntry
Type: objectNo Additional Properties
Dataset
Type: stringThe dataset to take snapshots of.
Recursive
Type: boolean Default: falseWhether to recursively snapshot child datasets.
Lifetime Value
Type: integer Default: 2Number 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: trueWhether this periodic snapshot task is enabled.
Exclude
Type: array of string Default: []Array of dataset patterns to exclude from recursive snapshots.
No Additional ItemsEach item of this array must be:
Naming Schema
Type: string Default: "auto-%Y-%m-%d_%H-%M"Naming pattern for generated snapshots using strftime format.
Allow Empty
Type: boolean Default: trueWhether to take snapshots even if no data has changed.
PoolSnapshotTaskCron
Type: objectCron schedule for when snapshots should be taken.
No Additional PropertiesMinute
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.
"00:00"
"06:30"
"18:00"
"23:00"
End
Type: string Default: "23:59"End time of the window when snapshots can be taken.
"00:00"
"06:30"
"18:00"
"23:00"
Id
Type: integerUnique identifier for the periodic snapshot task.
State
Type: stringCurrent state of the task.
Naming Schema
Type: array of string Default: []List of naming schemas for pull replication.
No Additional ItemsEach item of this array must be:
Also Include Naming Schema
Type: array of string Default: []List of naming schemas for push replication.
No Additional ItemsEach item of this array must be:
Name Regex
Default: nullReplicate all snapshots which names match specified regular expression.
Must be at least 1
characters long
Auto
Type: booleanAllow replication to run automatically on schedule or after bound periodic snapshot task.
Schedule to run replication task. Only auto
replication tasks without bound periodic snapshot tasks can have a schedule.
ReplicationTimeCronModel
Type: objectNo Additional Properties
Minute
Type: string Default: "00""00" - "59"
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 for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
End
Type: string Default: "23:59"End time for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
Restricts when replication task with bound periodic snapshot tasks runs. For example, you can have periodic snapshot tasks that run every 15 minutes, but only run replication task every hour.
ReplicationTimeCronModel
Type: objectNo Additional Properties
Minute
Type: string Default: "00""00" - "59"
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 for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
End
Type: string Default: "23:59"End time for the time window in HH:MM format.
"00:00"
"06:30"
"18:00"
"23:00"
Only Matching Schedule
Type: boolean Default: falseWill only replicate snapshots that match schedule
or restrict_schedule
.
Allow From Scratch
Type: boolean Default: falseWill destroy all snapshots on target side and replicate everything from scratch if none of the snapshots on target side matches source snapshots.
Readonly
Type: enum (of string) Default: "SET"Controls destination datasets readonly property.
SET
: Set all destination datasets to readonly=on after finishing the replication.REQUIRE
: Require all existing destination datasets to have readonly=on property.IGNORE
: Avoid this kind of behavior.
Must be one of:
- "SET"
- "REQUIRE"
- "IGNORE"
Hold Pending Snapshots
Type: boolean Default: falsePrevent source snapshots from being deleted by retention of replication fails for some reason.
Retention Policy
Type: enum (of string)How to delete old snapshots on target side:
SOURCE
: Delete snapshots that are absent on source side.CUSTOM
: Delete snapshots that are older thanlifetime_value
andlifetime_unit
.NONE
: Do not delete any snapshots.
Must be one of:
- "SOURCE"
- "CUSTOM"
- "NONE"
Lifetime Value
Default: nullNumber of time units to retain snapshots for custom retention policy. Only applies when retention_policy
is CUSTOM.
Value must be greater or equal to 1
Lifetime Unit
Default: nullTime unit for snapshot retention for custom retention policy. Only applies when retention_policy
is CUSTOM.
Must be one of:
- "HOUR"
- "DAY"
- "WEEK"
- "MONTH"
- "YEAR"
Lifetimes
Type: array of object Default: []Array of different retention schedules with their own cron schedules and lifetime settings.
No Additional ItemsEach item of this array must be:
ReplicationLifetimeModel
Type: objectNo Additional Properties
CronModel
Type: objectCron schedule for when snapshot retention policies are applied.
No Additional PropertiesMinute
Type: string Default: "*""00" - "59"
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)
Lifetime Value
Type: integerNumber of time units to retain snapshots.
Value must be greater or equal to 1
Lifetime Unit
Type: enum (of string)Time unit for snapshot retention.
Must be one of:
- "HOUR"
- "DAY"
- "WEEK"
- "MONTH"
- "YEAR"
Compression
Default: nullCompresses SSH stream. Available only for SSH transport.
Must be one of:
- "LZ4"
- "PIGZ"
- "PLZIP"
Speed Limit
Default: nullLimits speed of SSH stream. Available only for SSH transport.
Value must be greater or equal to 1
Large Block
Type: boolean Default: trueEnable large block support for ZFS send streams.
Embed
Type: boolean Default: falseEnable embedded block support for ZFS send streams.
Compressed
Type: boolean Default: trueEnable compressed ZFS send streams.
Retries
Type: integer Default: 5Number of retries before considering replication failed.
Value must be greater or equal to 1
Logging Level
Default: nullLog level for replication task execution. Controls verbosity of replication logs.
Must be one of:
- "DEBUG"
- "INFO"
- "WARNING"
- "ERROR"
Enabled
Type: boolean Default: trueWhether this replication task is enabled.
State
Type: objectCurrent state information for the replication task.
Job
Information about the currently running job. null
if no job is running.
Has Encrypted Dataset Keys
Type: booleanWhether this replication task has encrypted dataset keys available.
Required roles: REPLICATION_TASK_WRITE