FRG: Tasks

Descriptions of each field in the Tasks section of the TrueNAS web interface.

  14 minute read

Cron Job

Add

DescriptionEnter a description of the cron job.
CommandEnter the full path to the command or script to be run.
Run as UserSelect a user account to run the command. The user must have permissions allowing them to run the command or script.
ScheduleSelect a schedule preset or choose Custom to open the advanced scheduler. Note that an in-progress cron task postpones any later scheduled instance of the same task until the running task is complete.
Hide Stardard OutputHide standard output (stdout) from the command. When unset, any standard output is mailed to the user account cron used to run the command.
Hide Standard ErrorHide error output (stderr) from the command. When unset, any error output is mailed to the user account cron used to run the command.
EnabledEnable this cron job. When unset, disable the cron job without deleting it.

Init/Shutdown Scripts

Add

DescriptionComments about this script.
TypeSelect Command for an executable or Script for an executable script.
CommandEnter the command with any options.
WhenPre Init is early in the boot process, after mounting filesystems and starting networking. Post Init is at the end of the boot process, before FreeNAS services start. Shutdown is during the system power off process.
EnabledEnable this task. Unset to disable the task without deleting it.
TimeoutAutomatically stop the script or command after the specified seconds.

Rsync Tasks: Add

Source

PathBrowse to the path to be copied. FreeBSD file path limits apply. Other operating systems can have different limits which might affect how they can be used as sources or destinations.
--
UserSelect the user to run the rsync task. The user selected must have permissions to write to the specified directory on the remote host.
DirectionDirect the flow of data to the remote host.
DescriptionEnter a description of the rsync task.

Schedule

ScheduleSelect a schedule preset or choose Custom to open the advanced scheduler.
RecusriveSet to include all subdirectories of the specified directory. When unset, only the specified directory is included.

Remote

Remote HostEnter the IP address or hostname of the remote system that will store the copy. Use the format username@remote_host if the username differs on the remote host.
Rsync ModeChoose to either use a custom-defined remote module of the rsync server or to use an SSH configuration for the rsync task.
Remote Module NameAt least one module must be defined in rsyncd.conf(5) of the rsync server or in the Rsync Modules of another system.

More Options

TimesSet to preserve modification times of files.
CompressSet to reduce the size of data to transmit. Recommended for slow connections.
ArchiveWhen set, rsync is run recursively, preserving symlinks, permissions, modification times, group, and special files. When run as root, owner, device files, and special files are also preserved. Equivalent to passing the flags -rlptgoD to rsync.
DeleteDelete files in the destination directory that do not exist in the source directory.
QuietSet to suppress informational messages from the remote server.
Perserve PermissionsSet to preserve original file permissions. This is useful when the user is set to root.
Perserve Extended AttributesExtended attributes are preserved, but must be supported by both systems.
Delay UpdatesSet to save the temporary file from each updated file to a holding directory until the end of the transfer when all transferred files are renamed into place.
Auxiliary ParametersAdditional rsync(1) options to include. Separate entries by pressing Enter. Note: The “” character must be escaped with a backslash (\.txt) or used inside single quotes ('*.txt’).
EnabledEnable this rsync task. Unset to disable this rsync task without deleting it.

S.M.A.R.T. Tests

Add

DisksSelect the disks to monitor.
TypeChoose the test type. See smartctl(8) for descriptions of each type. Some types will degrade performance or take disks offline. Avoid scheduling S.M.A.R.T. tests simultaneously with scrub or resilver operations.
DescriptionEnter any information about this S.M.A.R.T. test.
ScheduleChoose one of the presets or select Custom to open the advanced scheduler.

Periodic Snapshot Tasks: Add

Dataset

DatasetSelect a pool, dataset, or zvol.
--
RecursiveSet to take separate snapshots of the dataset and each of its child datasets. Leave unset to take a single snapshot only of the specified dataset without child datasets.
ExcludeExclude specific child datasets from the snapshot. Use with recursive snapshots. List paths to any child datasets to exclude. Example: pool1/dataset1/child1. A recursive snapshot of pool1/dataset1 will include all child datasets except child1. Separate entries by pressing Enter.

Schedule

Snapshot LifetimeDefine a length of time to retain the snapshot on this system using a numeric value and a single lowercase letter for units. Examples: 3h is three hours, 1m is one month, and 1y is one year. Does not accept Minute values. After the time expires, the snapshot is removed. Snapshots which have been replicated to other systems are not affected.
--
Nameing SchemaSnapshot name format string. The default is auto-%Y-%m-%d_%H-%M. Must include the strings %Y, %m, %d, %H, and %M, which are replaced with the four-digit year, month, day of month, hour, and minute as defined in strftime(3). For example, snapshots of pool1 with a Naming Schema of customsnap-%Y%m%d.%H%M have names like pool1@customsnap-20190315.0527.
ScheduleChoose one of the presets or choose Custom to use the advanced scheduler.
Allow Taking Empty SnapshotsCreates dataset snapshots even when there have been no changes to the dataset from the last snapshot. Recommended for reating long-term restore points, multiple snapshot tasks pointed at the same datasets, or to be compatible with snapshot schedules or replications created in TrueNAS 11.2 and earlier. For example, allowing empty snapshots for a monthly snapshot schedule allows that monthly snapshot to be taken, even when a daily snapshot task has already taken a snapshot of any changes to the dataset.
EnabledTo activate this periodic snapshot schedule, set this option. To disable this task without deleting it, unset this option.

Replication Tasks: Wizard

What and Where

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

Source Location: On this System

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 have not been created by an automated snapshot task. Requires setting a naming schema for the custom 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.

Destination Location: On a Different System

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 will store 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 will create new zvol at that location. For example, selecting pool1/dataset1 will store snapshots in dataset1, but clicking the path and typing /zvol1 after dataset1 will create zvol1 for snapshot storage.
EncryptionSet to use encryption when replicating data. Additional encryption options will appear.
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.

Replication Tasks: Advanced

General

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

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 Bloxks 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

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

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

DestinationDefine the path to a system location that will store 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 will create new zvol at that location.
For example, selecting pool1/dataset1 will store snapshots in dataset1, but clicking the path and typing /zvol1 after dataset1 will create zvol1 for snapshot s
Destination Dataset Read-only PolicySET will 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.
Encryption
Synchronize Destination Snapshots With SourceSet to use encryption when replicating data. Additional encryption options will 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.

Resilver Priority

Resilver Priority

EnabledSet to run resilver tasks between the configured times.
BeginChoose the hour and minute when resilver tasks can be started.
EndChoose the hour and minute when new resilver tasks are not allowed to start. This does not affect active resilver tasks.
Days of the WeekSelect the days to run resilver tasks.

Scrub Tasks: Add

Scrub Tasks

PoolChoose a pool to scrub.
ThresholddaysDays before a completed scrub is allowed to run again. This controls the task schedule. For example, scheduling a scrub to run daily and setting Threshold days to 7 means the scrub attempts to run daily. When the scrub is successful, it continues to check daily but does not run again until seven days have elapsed. Using a multiple of seven ensures the scrub always occurs on the same weekday.
DescriptionDescribe the scrub task.
ScheduleHow often to run the scrub task. Choose one of the presets or choose Custom to use the advanced scheduler.
EnabledUnset to disable the scheduled scrub without deleting it.

Cloud Sync Tasks: Add

Transfer

DescriptionEnter a description of the Cloud Sync Task.
DirectionPUSH sends data to cloud storage. PULL receives data from cloud storage. Changing the direction resets the Transfer Mode to COPY.
Transfer ModeSYNC: Files on the destination are changed to match those on the source. If a file does not exist on the source, it is also deleted from the destination. COPY: Files from the source are copied to the destination. If files with the same names are present on the destination, they are overwritten. MOVE: After files are copied from the source to the destination, they are deleted from the source. Files with the same names on the destination are overwritten.
Directory/FilesSelect the directories or files to be sent to the cloud for Push syncs, or the destination to be written for Pull syncs. Be cautious about the destination of Pull jobs to avoid overwriting existing files.

Remote

CredentialSelect the cloud storage provider credentials from the list of available Cloud Credentials.

Control

ScheduleSelect a schedule preset or choose Custom to open the advanced scheduler.
EnabledEnable this Cloud Sync Task. Unset to disable this Cloud Sync Task without deleting it.

Advanced Options

Follow SumlinksFollow symlinks and copy the items to which they link.
Pre-ScriptScript to execute before running sync.
Post-ScriptScript to execute after running sync.
ExcludeList of files and directories to exclude from sync. Separate entries by pressing Enter. See rclone filtering for more details about the –exclude option.

Advanced Remote Options

Remote EncryptionPUSH: Encrypt files before transfer and store the encrypted files on the remote system. Files are encrypted using the Encryption Password and Encryption Salt values. PULL: Decrypt files that are being stored on the remote system before the transfer. Transferring the encrypted files requires entering the same Encryption Password and Encryption Salt that was used to encrypt the files. Additional details about the encryption algorithm and key derivation are available in the rclone crypt File formats documentation.
TransfersNumber of simultaneous file transfers. Enter a number based on the available bandwidth and destination system performance. See rclone –transfers.
Bandwidth limitA single bandwidth limit or bandwidth limit schedule in rclone format. Separate entries by pressing Enter. Example: 08:00,512 12:00,10MB 13:00,512 18:00,30MB 23:00,off. Units can be specified with the beginning letter: b, k (default), M, or G. See rclone –bwlimit.