Get a Quote   (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

Replication Tasks

  8 minute read.

Last Modified 2022-05-12 16:25 EDT

Basic Creation

TasksReplicationTasksAdd

TasksReplicationTasksAddLocalSourceRemoteDestWeeklyCustomLife

What and Where

NameDesciption
Load Previous Replication TaskUse settings from a saved replication.
Source LocationStorage location for the original snapshots that are replicated.
Destination LocationStorage location for the replicated snapshots.
Task NameName of this replication configuration.

Source Location: On this System

NameDesciption
SourceDefine the path to a system location that has snapshots to replicate. Click the folder to see all locations on the source system or click in the field to manually type a location (Example: pool1/dataset1). Multiple source locations can be selected or manually defined with a comma (,) separator. Selecting a location displays the number of existing snapshots that can be replicated. Selecting a location that has no snapshots configures the replication task to take a manual snapshot of that location and replicate it to the destination.
RecursiveSet to also replicate all snapshots contained within the selected source dataset snapshots. Unset to only replicate the selected dataset snapshots.
Replicate Custom SnapshotsReplicate snapshots that are not created by an automated snapshot task. Requires setting a naming schema for the custom snapshots.
Naming SchemaPattern of naming custom snapshots replicated. Enter the name and strftime(3) {0}, {1}, {2}, {3}, and {4} strings that match the snapshots to include in the replication. Separate entries by pressing Enter. The number of snapshots matching the patterns display.

Source Location: On a Different System

NameDesciption
SSH ConnectionsSelect an existing SSH connection to a remote system or choose Create New to create a new SSH connection.
SourceDefine the path to a system location that has snapshots to replicate. Click the folder to see all locations on the source system or click in the field to manually type a location (Example: pool1/dataset1). Multiple source locations can be selected or manually defined with a comma (,) separator. Selecting a location displays the number of existing snapshots that can be replicated. Selecting a location that has no snapshots configures the replication task to take a manual snapshot of that location and replicate it to the destination.
RecursiveSet to also replicate all snapshots contained within the selected source dataset snapshots. Unset to only replicate the selected dataset snapshots.
Naming SchemaPattern of naming custom snapshots to be replicated. Enter the name and strftime(3) {0}, {1}, {2}, {3}, and {4} strings that match the snapshots to include in the replication. Separate entries by pressing Enter. The number of snapshots matching the patterns are shown.
SSH Transfer SecurityData transfer security. The connection is authenticated with SSH. Data can be encrypted during transfer for security or left unencrypted to maximize transfer speed. Encryption is recommended, but can be disabled for increased speed on secure networks.

Destination Location: On this System

NameDesciption
DestinationDefine the path to a system location that stores replicated snapshots. Click the folder to see all locations on the destination system or click in the field to manually type a location path (Example: pool1/dataset1). Selecting a location defines the full path to that location as the destination. Appending a name to the path creates a new zvol at that location. For example, selecting pool1/dataset1 stores snapshots in dataset1, but clicking the path and typing /zvol1 after dataset1 creates zvol1 for snapshot storage.
EncryptionSet to use encryption when replicating data. Additional encryption options appear.

Destination Location: On a Different System

NameDesciption
SSH ConnectionsSelect a saved remote system SSH connection or choose Create New to create a new SSH connection.
DestinationDefine the path to a system location that stores replicated snapshots. Click the folder to see all locations on the destination system or click in the field to manually type a location path (Example: pool1/dataset1). Selecting a location defines the full path to that location as the destination. Appending a name to the path creates a new zvol at that location. For example, selecting pool1/dataset1 stores snapshots in dataset1, but clicking the path and typing /zvol1 after dataset1 creates zvol1 for snapshot storage.
EncryptionSet to use encryption when replicating data. Additional encryption options appear.

When

NameDesciption
Replication ScheduleText
Destination Snapshot LifetimeWhen replicated snapshots are deleted from the destination system. Same as Source uses the configured snapshot lifetime value from the source dataset periodic snapshot task. Never Delete never deletes snapshots from the destination system. Custom sets a how long a snapshot remains on the destination system. Enter a number and choose a measure of time from the drop-down.
ScheduleSet specific times to snapshot what you specified in Source Datasets and replicate the snapshots to the location in Destination Dataset. Select a preset schedule or choose Custom to use the advanced scheduler.
TextText

Advanced Creation

TasksReplicationAddAdvanced

General

NameDescription
NameDescriptive name for the replication.
DirectionPUSH sends snapshots to a destination system. PULL connects to a remote system and retrieves snapshots matching a Naming Schema.
TransportSSH is supported by most systems. It requires a previously created connection in System > SSH Connections. SSH+NETCAT uses SSH to establish a connection to the destination system, then uses py-libzfs to send an unencrypted data stream for higher transfer speeds. This only works when replicating to a FreeNAS, TrueNAS, or other system with py-libzfs installed. LOCAL efficiently replicates snapshots to another dataset on the same system without using the network. LEGACY uses the legacy replication engine from FreeNAS 11.2 and earlier.
Number of retries for failed replicationsNumber of times the replication is attempted before stopping and marking the task as failed.
Logging LevelMessage verbosity level in the replication task log.
EnabledActivates the replication schedule.

Transport Options

NameDescription
SSH ConnectionChoose a connection that has been saved in System > SSH Connections.
Stream CompressionSelect a compression algorithm to reduce the size of the data being replicated. Only appears when SSH is chosen for Transport type.
LimitLimit replication speed to this number of bytes per second.
Allow Blocks Larger than 128KBAllow this replication to send large data blocks. The destination system must also support large blocks. This setting cannot be changed after it has been enabled and the replication task is created. For more details, see zfs(8).
Allow Compressed WRITE RecordsUse compressed WRITE records to make the stream more efficient. The destination system must also support compressed WRITE records. See zfs(8).

Source

NameDescription
SourceDefine the path to a system location that has snapshots to replicate. Click the folder to see all locations on the source system or click in the field to manually type a location (Example: pool1/dataset1). Multiple source locations can be selected or manually defined with a comma (,) separator.
RecusiveReplicate all child dataset snapshots. When set, Exclude Child Datasets becomes available.
Include Dataset PropertiesInclude dataset properties with the replicated snapshots.
Full Filesystem ReplicationCompletely replicate the selected dataset. The target dataset will have all of the properties, snapshots, child datasets, and clones from the source dataset.
Properties ExcludeList any dataset properties that will not be included with the replication.
Periodic Snapshot TasksSnapshot schedule for this replication task. Choose from previously configured Periodic Snapshot Tasks. This replication task must have the same Recursive and Exclude Child Datasets values as the chosen periodic snapshot task. Selecting a periodic snapshot schedule removes the Schedule field.
Replicate Specific SnapshotsOnly replicate snapshots that match a defined creation time. To specify which snapshots will be replicated, set this checkbox and define the snapshot creation times that will be replicated. For example, setting this time frame to Hourly will only replicate snapshots that were created at the beginning of each hour.
Also Include Naming SchemaPattern of naming custom snapshots to include in the replication with the periodic snapshot schedule. Enter the strftime(3) strings that match the snapshots to include in the replication. When a periodic snapshot is not linked to the replication, enter the naming schema for manually created snapshots. Has the same {0}, {1}, {2}, {3}, and {4} string requirements as the Naming Schema in a Periodic Snapshot Task. Separate entries by pressing Enter.
Saving Pending SchemaPrevent source system snapshots that have failed replication from being automatically removed by the Snapshot Retention Policy.

Replication Schedule

NameDescription
Run AutomaticallySet to either start this replication task immediately after the linked periodic snapshot task completes or continue to create a separate Schedule for this replication.
ScheduleStart time for the replication task.

Destination

NameDescription
DestinationDefine the path to a system location that stores replicated snapshots. Click the folder to see all locations on the destination system or click in the field to manually type a location path (Example: pool1/dataset1). Selecting a location defines the full path to that location as the destination. Appending a name to the path creates a new zvol at that location. For example, selecting pool1/dataset1 stores snapshots in dataset1, but clicking the path and typing /zvol1 after dataset1 creates zvol1 for snapshots.
Destination Dataset Read-only PolicySET changes all destination datasets to readonly=on after finishing the replication. REQUIRE stops replication unless all existing destination datasets to have the property readonly=on. IGNORE disables checking the readonly property during replication.
EncryptionSet to use encryption when replicating data. Additional encryption options appear.
Synchronize Destination Snapshots With SourceSet to use encryption when replicating data. Additional encryption options appear.
Snapshot Retention PolicyIf the destination system has snapshots but they do not have any data in common with the source snapshots, destroy all destination snapshots and do a full replication. Warning: enabling this option can cause data loss or excessive data transfer if the replication is misconfigured. When replicated snapshots are deleted from the destination system: Same as Source: use the Snapshot Lifetime from from the source periodic snapshot task. Custom: define a Snapshot Lifetime for the destination system. None: never delete snapshots from the destination system.