Backing Up TrueNAS

After configuring your TrueNAS storage and data sharing or any other function, service, or application, it is time to ensure an effective data backup.

You should also:

TrueNAS provides several options to set up a data storage backup method, including using a cloud sync provider and a scheduled task or configuring a replication task.

Backing Up the System Configuration

After setting up TrueNAS, first, back up your system configuration by downloading the system configuration file.

In TrueNAS 25.04 (and later), users must log in as a system administrator with full administrative access to upload or download a system configuration file. Other users, including restricted admin accounts such as a shares administrator, cannot perform database operations. See Using Administrator Logins for more information on admin account types.

When downloading the configuration (config) file, select the Export Password Secret Seed option to include the secret seed in the config file. Downloading the config file allows you to restore the system to a different operating system device where the secret seed is not already present.

Why should I save the secret seed?

The secret seed is used to decrypt encrypted fields in the TrueNAS configuration database. Various fields are encrypted because they might contain sensitive information such as cryptographic certificates, passwords (not user login passwords), or weak hashing algorithms (for example, NT hashes of SMB users).

When a config file is restored without the secret seed, encrypted fields are set to empty values. This means various services can break due to the missing information. Examples are SMB via local accounts and apps. Always select the option to save the secret seed when downloading the system config file!

Note, the secret seed does not store local users passwords in any form, only a hash of the password sufficient for authentication. Hashed passwords are not encrypted.

What happens if I do not save the secret seed? You might be prompted to enter a default password or reset the password. The UI should allow users to log into the system with their current password but might be prompted to enter a new password. Users can connect a keyboard and monitor to the system and enter a new password if they cannot log into the web UI or reset the current password.

Is there a default password for the system? Enterprise users are issued a password to enter if prompted for such a password after the system resets. Community users are not issued a default password and the system does not generate a default password for this purpose. If you cannot log into the UI with the current administration password, connect a keyboard and monitor to the system server to reset the password.

After logging into the system, recheck all system settings to verify the configurations are correct, and then test to verify the system is working as desired. When complete and the system is operating per the desired configuration, download and save the system configuration with the secret seed option selected and keep it in a secure location.

It is a best practice to always save the secret seed with the system configuration file after making system configuration changes to have a current backup copy to use should the need arise.

Physically secure the config file with the secret seed, and any encryption key files to decrypt encrypted datasets or pools.

We recommend backing up the system configuration regularly. Doing so preserves settings when migrating, restoring, or fixing the system if it runs into any issues. Save the configuration file each time the system configuration changes.

To download the configuration file:

Go to System > General Settings and click on Manage Configuration. Select Download File.

The Save Configuration dialog opens.

Select Export Password Secret Seed and then click Save. The system downloads the system configuration. Keep this file in a safe location on your network where files are regularly backed up.

Downloading the Initial System Debug File

After saving the system configuration, save an initial system debug file by going to System > Advanced Settings and clicking Save Debug. After the download completes, save this initial debug file with your system configuration file.

Why download the initial system debug file? Downloading and storing the initial system debug after completing the system configuration is a recommended best practice to have a point of reference for your system if a problem arises. Save a debug file after a major system upgrade or reconfiguration to provide Support or Engineering if requested.

Create a Boot Environment

After installing and completing your system configuration, create a boot environment to use as a restore point.

If you lose access to the TrueNAS UI, you can establish an SSH session and restore it from the boot environment. You can clone the boot environment listed after the initial-install environment and rename the clone to something you recognize, such as the release number with date and time.

Backing Up TrueNAS Storage Data

TrueNAS has several options that allow you to back up data:

TrueCloud backup and cloud sync tasks require setting up a cloud service provider account and adding the credentials in TrueNAS before configuring and scheduling the tasks.

Replication requires setting up SSH credentials before configuring and scheduling the task. Rsync tasks can be configured with SSH credentials or set to use a module.

Using TrueCloud Backup or Cloud Sync

Cloud sync requires an account with a cloud storage provider and a storage location created with that provider, like an Amazon S3 bucket. TrueNAS supports major providers like Storj, Amazon S3, Google Cloud, Box, and Microsoft Azure, along with a variety of other vendors. These providers can charge fees for data transfer and storage, so please review the policies of your cloud storage provider before transferring your data.

Cloud sync and TrueCloud backup tasks can be configured to send, receive, or synchronize data with a cloud storage provider.

The simplest way to set up a TrueCloud backup task is using a Storj iX account. See Managing TrueCloud Backup Tasks for a full tutorial.

See Adding Cloud Credentials for information on connecting TrueNAS to other cloud storage providers.

Using Replication

Replication takes a moment-in-time snapshot of data and then copies that snapshot to another location. Snapshot technology typically uses less storage than full file backups and has more management and snapshot storage options.

Setting Up a Simple Replication Task

To create a simple replication task with the TrueNAS replication wizard:

Replication needs an existing periodic snapshot task** to run before the replication task runs or the replication task fails. You can define a periodic snapshot before manually configuring the replication task, or let the system create the snapshot task by selecting the replication wizard Replicate Custom Snapshots option. When using the wizard, TrueNAS automatically creates the periodic snapshot task and then runs the replication task.

  1. Create a periodic snapshot task using the replication wizard Replicate Custom Snapshots replication option. If scheduling a task, TrueNAS creates the periodic snapshot task when it runs the replication task according to the scheduled time.

  2. Create the replication task.

Go to Data Protection, and click Add on the Replication Tasks widget to open the Replication Task Wizard configuration screen.

Select the Source Location and Destination Location using the dropdown list options. You can back up your data on the same or a different system. If selecting A different system, you must have an SSH connection to that system. Have your destination and source information ready.

Set the Source and Destination paths, either enter the full path to the data you want to back up or click on the caret to the left of mnt and at the pool and dataset levels to expand the options. Click on the dataset or directory to narrow the backup down to that level.

The task name populates from the values in Source and Destination.

Select Replicate Custom Snapshots.

Click Next.

  1. Define when to run this task.

Select the radio button for Run On a Schedule and select the schedule you want to use. Select Run Once to run the task manually. When using this option, you must have defined a periodic snapshot task. If running on a schedule, you do not need to pre-defined a snapshot task.

Select the radio button to specify the destination snapshot lifetime.

  1. Click START REPLICATION. The task appears on the Replication Tasks widget with the status PENDING.

You can monitor created backup tasks from the Dashboard widget.