TrueNASTrueNAS Nightly Development Documentation
This content follows experimental nightly development software. Pre-release software is intended for testing purposes only.
Use the Product and Version selectors above to view content specific to a stable software release.

TrueCloud Backup Tasks Screens

The TrueCloud Backup Tasks widget on the Data Protection screen shows configured TrueCloud tasks, and provides access to configuration screens to add or schedule recurring transfers between TrueNAS and a cloud storage provider account like Storj iX.

TrueCloud backup tasks are an effective method to back up data to a remote location, restore snapshots, or perform cloud-storage-migration.

TrueCloud Backup Tasks Widget

The TrueCloud Backup Tasks widget shows a list of tasks configured on the system.

TrueCloud Backup Tasks Widget
Figure 1: TrueCloud Backup Tasks Widget

The widget shows No records have been added yet until a TrueCloud task is added.

The widget header opens the TrueCloud Backup Tasks screen that lists all TrueCloud backup tasks configured on the system.

Add on the widget and the TrueCloud Backup Tasks screen opens the Add TrueCloud Backup Task Screen.

Each task on the widget shows four icons for various functions:

  • edit Edit opens the Edit TrueCloud Backup Task screen populated with with the settings for that task.

  • Run Now starts and runs the backup task outside of the scheduled time.

  • View Details opens the TrueCloud Backup Tasks screen that lists backup tasks configured on the system. Click on a task to see details for the selected task.

  • delete Delete opens a confirmation dialog before the system deletes the task.

State shows the status of the previous or current task. Possible status indications are:

  • SUCCESS for completed tasks.
  • FAILED if the task fails to complete.
  • RUNNING for tasks in progress. 8 N/A for scheduled tasks before they run.

TrueCloud Logs Dialog

The state oval opens the Logs dialog for that task. Download Logs saves a copy of the current task logs.

TrueCloud Logs Dialog
Figure 2: TrueCloud Logs Dialog

TrueCloud Backup Tasks Screen

The TrueCloud Backup Tasks screen lists all tasks configured on the system. The TrueCloud Backup Tasks on the widget title or View Details on a task opens the TrueCloud Backup Tasks screen.

TrueCloud Backup Tasks Screen
Figure 3: TrueCloud Backup Tasks Screen

Task options perform the same functions as the icons on the widget:

  • edit Edit opens the Edit TrueCloud Backup Task screen populated with with the settings for that task.

  • Run Now starts and runs the backup task outside of the scheduled time.

  • delete Delete opens a confirmation dialog before the system deletes the task.

Select any task to see details for the configured task, such as the schedule, path to the dataset or directories, snapshots, and other task options.

Snapshots Widget

The Snapshots widget lists existing TrueCloud snapshots for the selected backup task. It contains options to restore from or delete an existing snapshot.

Snapshots Widget
Figure 4: Snapshots Widget

Restore opens the Restore from Snapshot screen.

delete Delete opens a confirmation dialog before the system deletes the snapshot.

Restore from Snapshot Screen

The Restore from Snapshot screen shows the date and time of the selected snapshot. It shows Remote and Local configuration options to restore the TrueCloud snapshot.

Restore from Snapshot
Figure 5: Restore from Snapshot

Remote Settings

Remote Settings specify all data in the backup or exclude some data from a restoration. Additional settings show depending on the Include/Exclude selection.

SettingsDescription
Include EverythingSelect to restore all backed-up data from the remote snapshot to the selected local path.
Include from subfolderSelect to restore data from a subfolder within the backed-up data.
SubfolderShows when Include from subfolder is selected. Enter or browse to the subfolder within the snapshot to restore data from.
Included PathsShows when Include from subfolder is selected. Select files and directories to include from the backup. Leave empty to include everything in the selected subfolder.
Select paths to excludeSelect to exclude only certain paths from the data to restore.
Excluded PathsShows when Select paths to exclude is selected. Enter or select files and directories to exclude from the backup. Select as many checkboxes as you want to select multiple paths or separate multiple entries with a comma.
Exclude by patternSelect to exclude files and directories matching defined glob patterns.
PatternShows when Exclude by pattern is selected.

Local Settings

Use Local settings to select the target mount point on the current (local) system where files are restored. Be cautious with setting the restore target to avoid overwriting existing files.

Target enter the path to the dataset or directory or browse to the location to populate the field with the local directory where files are restored.

Browsing to select a path

Click the arrow to the left of the folder icon to expand that folder and show any child datasets and directories. A solid folder icon shows for datasets and an outlined folder for directories. A selected dataset or directory folder and name shows in blue.

Create Dataset opens a dialog to name and create a new dataset at the selected target.

Save starts restoring data from the snapshot.

Add and Edit TrueCloud Backup Task Screen

The Add TrueCloud Backup Task and Edit TrueCloud Backup Task screens contain options to configure a new backup task. The edit screen opens populated with the existing task settings. Each screen shows the Local, Remote, Task Settings, and Control basic settings. The Advanced and Advanced Remote Options are for use by advanced users.

Add TrueCloud Backup Task - Basic Options
Figure 7: Add TrueCloud Backup Task - Basic Options

Local Settings

Local settings allow selecting the dataset or directory to use in the task. Selecting the dataset populates the Source Path field.

Browsing to select a path

Click the arrow to the left of the folder icon to expand that folder and show any child datasets and directories. A solid folder icon shows for datasets and an outlined folder for directories. A selected dataset or directory folder and name shows in blue.

SettingsDescription
Source PathEnter or browse to the path of the dataset or directory with the data to send to the cloud backup provider used in the task. Click the arrow_right arrow to the left of the /mnt folder to expand and show datasets and directories within that folder. This is the dataset or directory location with the data the TrueCloud backup task sends to the cloud storage provider. Click the arrow_right arrow to the left of the /mnt folder again to collapse the directory tree.

Remote Settings

The Remote settings specify the TrueCloud credential and destination storage locations.

SettingsDescription
CredentialSelect an existing Storj iX credential from the dropdown list. TrueNAS automatically validates the selected credential.
Select Add New to open the Cloud Credentials screen. This is the same configuration screen that opens when you click Add on the Credentials > Backup Credentials screen.
BucketDisplays after selecting the Storj credential. Select a pre-configured Storj bucket. Only TrueNAS compatible Storj buckets are selectable.
Select Add New to create a new Storj bucket from the TrueNAS UI.
New Bucket NameDisplays when Add New is selected in the Bucket field. Enter the name for the new bucket. Only lowercase letters, numbers, and hyphens are allowed.
FolderEnter or browse to the dataset or directory to receive the backed-up data. Click the arrow_right arrow to the left of the folder icon and at each dataset or directory to reach the storage location to use for this task.
Enter /name, where name is a folder that does not exist, to create a new folder in the bucket.

Task Settings

Task Settings specify the task name, snapshot retention policy, and password for the backup repository.

SettingsDescription
NameEnter a name for the TrueCloud backup task.
Keep LastEnter a number of past snapshot copies to retain before removing older snapshots.
PasswordEnter a password for the backup repository. Record this password in a secure location. Required to recreate the task using the same bucket/folder, such as in a new TrueNAS install or system, or to restore data from the existing snapshots in another TrueNAS system.

Control Settings

Control settings establish a schedule for when to run the backup task.

SettingsDescription
ScheduleSelect a schedule preset or choose Custom to open the advanced scheduler.
EnabledSelect to enable the TrueCloud task. Leave clear to disable the task without deleting it and keep the configuration available without allowing the specified schedule to run the task. The toggle in the Enable column on the TrueCloud Backup Tasks widget enables/disables the task.
Advanced Scheduler

Tasks Advanced Scheduler

Choosing a Presets option populates the rest of the fields. To customize a schedule, enter crontab values for the Minutes/Hours/Days.

These fields accept standard cron values. The simplest option is to enter a single number in the field. The task runs when the time value matches that number. For example, entering 10 means that the job runs when the time is ten minutes past the hour.

An asterisk (*) means match all values.

Specific time ranges are set by entering hyphenated number values. For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.

You can also enter lists of values. Enter individual values separated by a comma (,). For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).

A slash (/) designates a step value. For example, while entering * in Days means the task runs every day of the month, */2 means the task runs every other day.

Combining all the above examples together creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.

There is an option to select which Months the task runs. Leaving each month unset is the same as selecting every month.

The Days of Week schedules the task to run on specific days. This is in addition to any listed days. For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.

The Schedule Preview displays when the current settings mean the task runs.

Examples of CRON syntax

SyntaxMeaningExamples
*Every item.* (minutes) = every minute of the hour.
* (days) = every day.
*/NEvery Nth item.*/15 (minutes) = every 15th minute of the hour (every quarter hour).
*/3 (days) = every 3rd day.
*/3 (months) = every 3rd month.
Comma and hyphen/dashEach stated item (comma)
Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour.
1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour.
mon-fri (days) = every Monday to Friday inclusive (every weekday).
mar,jun,sep,dec (months) = every March, June, September, December.

Days can be specified as days of month, or days of week.

With these options, you can create flexible schedules similar to these examples:

Desired scheduleValues to enter
3 times a day (at midnight, 08:00 and 16:00)months=*; days=*; hours=0/8 or 0,8,16; minutes=0
(Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday, Wednesday and Friday, at 8.30 pmmonths=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 ammonths=oct-dec,jan-jun; days=1,15; hours=0; minutes=1
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to FridayNote that this requires two tasks to achieve:
(1) months=*; days=mon-fri; hours=8-18; minutes=*/15
(2) months=*; days=mon-fri; hours=19; minutes=0
We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.

Advanced Options Settings

Advanced Options settings are intended for use by advanced users.

Add TrueCloud Backup Task - Advanced Options
Figure 9: Add TrueCloud Backup Task - Advanced Options
SettingsDescription
Take SnapshotSelect to take a snapshot before transferring data to the specified cloud provider like Storj. This option is not available to datasets with child datasets.
Pre-Script(For advanced users only) Enter a script to execute before running the task. See the Managing TrueCloud Backup Tasks tutorial for more information.
Post-Script(For advanced users only) Enter a script to execute after running the task. See the Managing TrueCloud Backup Tasks tutorial for more information.
ExcludeEnter a list of files and directories to exclude from the backup. Separate entries by pressing Enter. See rclone filtering for more details about the --exclude option and proper syntax.

Advanced Remote Options

Advanced Remote Options settings are intended for use by advanced users.

SettingsDescription
TransfersEnter the number of simultaneous file transfers to allow. Base the number on the available bandwidth and destination system performance. See rclone –transfers.
Bandwidth limitEnter a single bandwidth limit or bandwidth limit schedule in rclone format. Separate entries by pressing <kbdEnter. Example: 08:00,512 12:00,10MB 13:00,512 18:00,30MB 23:00,off. You can specify units with the beginning letter b, k (default), M, or G. See rclone –bwlimit.