Illustrated title card for the guide: Homelab 3-2-1 Backup Architecture for VMs and NAS
backup-strategy

Homelab 3-2-1 Backup Architecture for VMs and NAS

Build a 3-2-1 backup plan for Proxmox VMs, TrueNAS datasets, and Docker apps with a separate NAS, an offsite copy, and a restore drill.

Use a separate backup NAS for Proxmox VM archives, replicated TrueNAS datasets, and Docker app backups. Send those backups to offsite cloud storage. That gives each workload three copies across local disk and cloud storage, with one copy offsite. Backblaze’s local and cloud example

Map the three copies

In this example, a dedicated TrueNAS system holds the local backups and sends them to Storj through TrueCloud Backup. Keep snapshots on the primary TrueNAS to recover older or deleted files. Those snapshots share storage with the live dataset, so count the replica on the backup NAS as the local backup. TrueNAS snapshot behavior TrueNAS remote replication TrueCloud backup tasks

WorkloadLive copySeparate backup NASOffsite cloud copy
Proxmox VMGuest disks and VM configurationvzdump archives in the VM backup datasetTrueCloud backups of the archive dataset
TrueNASLive file datasets and active NAS configurationReplicated datasets and a protected configuration exportTrueCloud backups of the replicated files and configuration export
Docker app on LinuxDeployment files, persistent data, and any databaseDeployment files, volume archives or bind-mount files, and database dumpsTrueCloud backups of the Docker backup dataset

When a VM or container uses files from a TrueNAS share, put those files in the TrueNAS row. Include each dataset that holds shared files. An NFS export serves the selected dataset, and NFS treats child datasets as separate filesystems. Proxmox VE backup guide TrueNAS NFS shares Docker volume guide

Back up Proxmox VMs to the backup NAS

On the backup NAS, go to Shares → Unix (NFS) Shares → Add. Select a child dataset for VM archives. Restrict Allowed Hosts to the Proxmox host. Under Advanced Options, clear Read-Only and use Maproot User to map client root to a local account that can write to the archive dataset. Save the share and select Enable Service if prompted. TrueNAS NFS setup

On Proxmox VE, substitute your backup NAS address, export path, and VM ID. Snapshot mode copies VM blocks while the guest runs, with a small risk of inconsistency. For recurring runs, open Datacenter → Backup, select the VM and backup-nas storage, and set the schedule and retention. Proxmox storage commands NFS storage settings vzdump options Backup modes and schedules

pvesm add nfs backup-nas --path /mnt/pve/backup-nas \
  --server 192.0.2.10 --export /mnt/backup/vm-archives --content backup
vzdump 777 --storage backup-nas --mode snapshot

Replicate TrueNAS data and save its configuration

This example uses TrueNAS 25.10 on both NAS systems. Give the administrator accounts on both systems home directories. On the backup NAS, go to Credentials → Users, edit the replication administrator, and enable SSH Access. Under Sudo Commands, select Allow all sudo commands with no password and save. In System → Services → SSH, edit the service, enable Allow Password Authentication, and save. Start or restart SSH.

On the primary NAS, go to Credentials → Backup Credentials → SSH Connections and click Add. Name the connection and set Setup Method to Semi-Automatic. Enter the backup NAS address as a URL in TrueNAS URL. Fill in Admin Username and Admin Password with the credentials for the remote web UI. Enter the backup NAS replication administrator’s username for the SSH session. In Private Key, select Generate New, then click Save. Back in SSH Connections, click Edit on the new connection and copy its public key. On the backup NAS, edit the replication administrator, paste the key into Public SSH Key, and save. TrueNAS replication prerequisites

On the backup NAS, go to Datasets and create the receiving dataset before opening the replication wizard. On the primary NAS, go to Data Protection → Replication and click Add. Set Source Location to On this System and Destination Location to On a Different System. Select the SSH connection and choose the primary dataset and its destination on the backup NAS. When setting up replication as an administrator, enable Use Sudo for ZFS Commands. If a confirmation dialog opens, click Use Sudo for ZFS Commands in the dialog. Use a destination with no existing snapshots or back up any destination snapshots with critical data before creating the task. TrueNAS replication wizard

Click Next after choosing the source and destination settings. Set Replication Schedule and Destination Snapshot Lifetime, save, and select Run Now. On the backup NAS, select the receiving dataset in Datasets and open Manage Snapshots to confirm that the expected snapshot arrived. The wizard creates a periodic snapshot task for local sources that have no existing snapshots. TrueNAS replication schedules and snapshot checks

On the primary NAS, sign in as a system administrator with full administrative access and go to System → Advanced Settings → Manage Configuration → Download File. In the Save Configuration dialog, select Export Password Secret Seed, then click Save to download the export. Store it in protected backup storage. Secure it alongside any keys needed to unlock encrypted datasets. Repeat the export after configuration changes. TrueNAS configuration backup guide

Back up Docker configuration and app data

On the backup NAS, go to Shares → Unix (NFS) Shares → Add and select a separate dataset for Docker backups, such as /mnt/backup/docker-backups. If the dataset does not exist, click Create Dataset, enter its name, and click Create. Under Allowed Hosts, click Add and enter the Docker host’s address or host name. In Advanced Options, clear Read-Only and use Mapall User to map requests to a local account with write access to the dataset. Save the share and select Enable Service if prompted. If NFS is still off, start it under System → Services.

On the Linux Docker host, install the NFS client package with your distribution’s package manager. On Ubuntu or Debian, run sudo apt-get install nfs-common. Mount the export at an existing local directory using the command below, substituting your NAS address, export path, and mount point. Once the mount succeeds, use the mounted directory for the Docker archive and PostgreSQL dump. TrueNAS NFS client setup

sudo mount -t nfs 192.0.2.10:/mnt/backup/docker-backups /mnt/docker-backups

Save the Compose file and any environment files it references. For each persistent mount, identify the Docker volume or host-side directory. For a bind mount, copy the host-side source files to the backup NAS. If the source files live on a TrueNAS share, cover them through dataset replication. During recovery, put bind-mount files at the configured source paths on the host running the Docker daemon. Restore each referenced env_file at its specified path relative to the restored Compose file. Compose environment files Docker bind mounts Docker volumes

For this file-only example, the container dbstore already has a volume mounted at /dbdata, and its writers are stopped. On the Docker host, run the archive command from the backup directory on the NAS share. Docker volume backup example

docker run --rm --volumes-from dbstore -v "$(pwd):/backup" \
  ubuntu tar cvf /backup/backup.tar /dbdata

For a simple PostgreSQL app, use a database-native dump. On the Docker host, use PostgreSQL client tools that can connect and authenticate to the app’s PostgreSQL server. In the shell running the dump, export PGHOST, PGPORT, and PGUSER for the server address, port, and a database user with read access to every table being backed up. Run pg_dump appdb > appdb.sql in the backup directory. This exports one database at a consistent point in time. Preserve the database roles separately if recovery requires them. PostgreSQL SQL dump and restore

Send the backup NAS data offsite

In the Storj iX dashboard, go to Access Keys → New Access Key, name the key, select S3 Credentials, and click Next. To let TrueNAS create the bucket, choose Full Access and click Create Access. Use Copy All or Download All to obtain the access key, secret key, and endpoint. Under Credentials → Backup Credentials, click Add on Cloud Credentials. Enter a descriptive Name and fill in Access Key ID and Secret Access Key. Click Verify Credentials, wait for verification, and click Save. Go to Data Protection → TrueCloud Backup Tasks → Add and select the saved Storj credential. Under Bucket, choose Add New and enter a name using only lowercase letters, numbers, and hyphens. TrueNAS creates the compatible bucket when you save the task. Set up a task for each protected path and give each task its own bucket folder. In Folder, enter /name to create a folder that does not exist, replacing name with the folder name. TrueCloud credentials and task setup

SettingWhat to enter in this example
Source PathVM backup dataset exported over NFS, a replicated file dataset, or a protected Docker or NAS configuration backup directory
Storj credential, Bucket, FolderSaved credential, compatible bucket, and a folder for that source
Keep LastNumber of recovery points the task should retain
Password and ScheduleRepository password and a schedule after the local copy is ready

For the VM archive task, leave Use Absolute Paths clear under Advanced Options to store relative paths. Keep Enabled selected for scheduled runs. Enter a name under Task Settings and click Save. After the VM archive and Docker files are complete and the NAS replica has arrived, open the saved task’s three-dot menu, select Run Job, and check for SUCCESS. Store the cloud credential, bucket and folder names, and repository password somewhere you can reach if the local NAS is lost. TrueCloud task status and repository recovery TrueCloud path and schedule settings

Rehearse recovery from both destinations

  1. VM. On Proxmox, use pvesm list backup-nas --vmid 777 to find the archive and pvesm path with its volume ID to get the file path. Set archive to that path. Use a Proxmox test setup where the restored guest will boot on a network isolated from the original VM and other live guests. Confirm that isolation before running qmrestore "$archive" 601 --storage restore-storage --start 1, using an unused VM ID and the ID of a storage that accepts VM disks. Proxmox starts the VM after a successful restore. Confirm the guest boots by signing in, then open a known guest file or check that a known service responds. Proxmox archive lookup and storage content types qmrestore options
  2. NAS file. On the backup NAS, open Datasets → Manage Snapshots for the replica. Expand the snapshot and select Clone to New Dataset. In the confirmation dialog, click Clone. Use the TrueNAS NFS share steps above to export the clone by its own dataset path. A parent NFS share does not expose child datasets. Under Allowed Hosts, specify the Linux verification host. In Advanced Options, select Read-Only, then save the share. Use the Linux mount command above with the clone export path and an existing local mount point. Once the mount succeeds, open a known file through it. Avoid rolling back the original dataset for this drill because rollback can destroy newer data and snapshots. TrueNAS clone and rollback controls
  3. Docker volume. From the directory with backup.tar, set restore_container to an unused container name for this run. Extract the archive only after Docker successfully creates the new container. Use the same name for --name and --volumes-from. In the docker inspect output, confirm that the volume entry under Mounts has Destination set to /dbdata. The last command opens a shell in a temporary container that mounts the recovered volume. Open a known recovered file under /dbdata inside that container. For PostgreSQL, confirm that both createdb and psql are configured to connect and authenticate to the intended scratch server. Choose an unused scratch database name and substitute it for local_scratch_name in both commands. From the directory containing the local appdb.sql, run createdb -T template0 local_scratch_name. Proceed only if it succeeds. To restore original ownership and permissions, ensure the users who owned objects or had permissions on them exist before running psql -X --set ON_ERROR_STOP=on local_scratch_name < appdb.sql. Check for expected records only after the import succeeds. Docker volume restore example PostgreSQL restore procedure
restore_container=volume-restore-local
docker run -v /dbdata --name "$restore_container" ubuntu /bin/bash &&
  docker run --rm --volumes-from "$restore_container" -v "$(pwd):/backup" \
    ubuntu bash -c "cd /dbdata && tar xvf /backup/backup.tar --strip 1" &&
  docker inspect "$restore_container" &&
  docker run -it --rm --volumes-from "$restore_container" ubuntu bash

Repeat the checks with cloud data. On a replacement TrueNAS, configure a local pool and dataset before recreating the tasks. Follow the credential steps above to re-add the Storj credential from the saved S3 keys. Click Verify Credentials and save the verified credential before selecting it in the recreated tasks. Set each task’s Source Path to an existing local dataset or directory and use the saved bucket, folders, and repository passwords. Leave Enabled clear while recovering. Enter a task name and click Save. In the recreated task’s menu, choose View Details, then select the recreated task to open its Snapshots widget. Select Restore for the chosen snapshot and choose Include Everything. In the Target picker, browse to the parent dataset, click Create Dataset, and name and create a fresh dataset. Select the new dataset as Target, then click Save to start the restore. Repeat for each protected path, using a separate fresh target dataset for each. Wait for each restore to finish before opening files or exporting its dataset. For the restored NAS files, reuse the NFS share and Linux mount steps from the clone drill. Export each restored file dataset by its own path as a Read-Only NFS share restricted to the Linux verification host. Mount that export on the verification host and open a known restored file through the mount. TrueCloud restore controls TrueCloud restore procedure

Export the recovered VM archive dataset over NFS. Use the recovered dataset root that keeps each archive at the same path relative to the export as before. If the NAS address or export path changed, repeat the pvesm add nfs command above with an unused storage ID such as backup-nas-recovery, its own local mount path, and the recovered export’s address and path. In that case, use pvesm list backup-nas-recovery --vmid 777 for archive lookup in the VM drill. Repeat the VM drill with the same network isolation before boot. Use an unused VM ID in the cloud drill, different from the local drill’s ID if its test VM still exists.

Export the recovered Docker dataset and mount it on the Docker host using the Docker NFS procedure above. Substitute the replacement NAS address, recovered export path, and a separate local mount point. Repeat the Docker drill from the mounted directory with the recovered files. Set restore_container to an unused container name for the cloud run. For PostgreSQL, work from the directory containing the recovered appdb.sql. As in the local drill, confirm that both createdb and psql are configured to connect and authenticate to the intended scratch server. Choose an unused scratch database name different from the local drill’s and substitute it for cloud_scratch_name in both commands. Run createdb -T template0 cloud_scratch_name and proceed only if it succeeds. With the required roles in place, run psql -X --set ON_ERROR_STOP=on cloud_scratch_name < appdb.sql. Check for expected records only after the import succeeds. TrueNAS NFS setup

Evidence and limits. Checked November 26, 2026 against TrueNAS 25.10, PostgreSQL 18, and the rolling Proxmox VE and Docker documentation. The backup and restore steps were not run for this article.

Sources

  1. Backblaze 3-2-1 backup strategy
  2. Proxmox VE backup and restore
  3. Proxmox VE NFS storage backend
  4. Proxmox VE storage manager
  5. Proxmox VE qmrestore command synopsis
  6. Proxmox VE vzdump command synopsis
  7. TrueNAS 25.10 NFS shares
  8. TrueNAS 25.10 remote replication
  9. TrueNAS 25.10 snapshots
  10. TrueNAS 25.10 periodic snapshot tasks
  11. TrueNAS 25.10 configuration backup
  12. TrueNAS 25.10 TrueCloud Backup Tasks
  13. TrueNAS 25.10 TrueCloud backup screens
  14. Docker Engine volumes
  15. Docker Engine bind mounts
  16. Docker Compose environment variable setup
  17. PostgreSQL 18 SQL dump and restore

Related