# 6. TrueNas Backups

<span>This chapter describes how you can backup your TrueNas VM or bare metal instance to another TrueNas instance. We will discuss both how to backup to another local instance and a remote instance. </span>

# 1. Installation

It is up to you where you will run your second TrueNas Scale instance, but it is recommended to either store it bare metal or as a VM with dedicated drives.

1. You have a PBS machine
2. You have a TrueNas scale machine VM or bare metal
3. And a third machine

If you only have one extra machine and not enough drives to provide pass through to a PBS VM and TrueNas scale VM then I would recommend to run run TrueNas scale bare metal and install PBS as container on top of it. This does of course mean that you cannot create another PVE VM for other purposes on the backup instance. However, TrueNas Scale also offers containers, and vm's nowadays so you could still run some extra apps on the backup machine if you have the resources and would like to do that.

# 2. Snapshots

Source: [TrueNas Replication Task](https://www.truenas.com/docs/scale/dataprotection/replication/remotereplication/)

Note! Running another Truenas on bare metal also allows you to run proxmox pbs as a container! If you have just as me one production device and a small backup server with like 4cpus and 16gb of ram then this would be great solution for you. Otherwise you need to have at least 3 devices.

This method involves backing up your Truenas datasets to another Truenas VM running on another host. This could for instance be your backup PVE instance on which you also run Proxmox backup server as a VM.

- Now, it is up to you if you want to use dedicated drives for this (which is best) however you can also attach virtual disks such you can use one disk for Truenas dataset backups and for PBS backups. This is what I am currently running in my home lab at least.

**Truenas VM with virtual drives**

If you want to go the virtual drive route then there is one little tweak that you need to make for TrueNas VM to recognize different drives.

1. Go your backup PVE's shell and nano into /etc/pve/qemu-server/VM-ID.conf
2. In here you want to add serial numbers to the disks that you added to the VM
3. This does not need to be complicated, they just need to be different for each drive. For instance you could use serial=DRIVE00X for each drive and changing X for each added drive. For instance with two drives it looks like this

```yaml
scsi0: local-zfs:vm-1002-disk-0,discard=on,iothread=1,size=12G,ssd=1,serial=DISK001
scsi1: tank:vm-1002-disk-1,discard=on,iothread=1,size=2000G,ssd=1,serial=DISK002
```