Offline Backup

I want to create an offline backup of my critical Truenas data.
I know Raid etc but I want a physical backup I can store in a safe. What I am thinking is.

  1. Get a USB drive and format it EXFat.
  2. Connect that drive to a separate Linux box
  3. Use Rsync to copy the data
  4. Remove usb drive and put it in the safe
  5. Periodicly do step 2-4 on a schedule.

That should work. You won’t have some of the file attributes that are not compatible between the 2 file system type.

It should be noted that RSync is no longer a share daemon in SCALE. If I remember correctly, it was deprecated a year ago in favor of moving it to an App. Not sure how that will work today with Docker… But, you can do it with SSH.

I did write up what I’ve done for backups here;

The advantage of using ZFS on the backup disk, (even though it is a single disk pool), is that you can scrub the data and make sure the backup is still good.

Normal RSync parameters won’t copy a file that has not changed date, time or size, so a RSync backup may not detect bad blocks in a file. You can overcome this by having RSync perform a checksum of blocks in a file, for testing whether to copy data over. Like this;

   --checksum, -c           skip based on checksum, not mod-time & size

But that will take much longer as it needs to read every file, on both source and destination to get the checksums. Now to be clear, RSync will only send the checksums over the network for comparison, so a slow network won’t impede that process.

1 Like

The bottom line is that ZFS replication is a far far better and more efficient algorithm / protocol / process than rsync (even locally).

  1. ZFS replication already knows which snapshots are at either end and can determine which blocks need to be copied without having to work it out separately for each file. Rsync needs to compare sizes and timestamps and possibly checksums for each file individually to work out whether it has changed.

  2. ZFS Replication is block based vs. rsync is file based. In other words if just one block in a large file has changed, ZFS copies the block and rsync copies the entire file.

1 Like

Thanks. I understand ZFS is a much better solution to keep data safe in a truenas server and use that but it does not lend itself to a removable capability in a disaster recovery plan. Quick and easy access to data is critical in a DR mode where seconds count a dollars.

It doesn’t take that long to install TrueNAS to a new machine.
You can also access ZFS pools (at least read-only if feature level doesn’t match) from FreeBSD, a number of Linux distros, and even from macOS (OpenZFS on OSX) or Windows (OpenZFS on Windows).
With the time you’ll waste on rsync doing its rsync things, I don’t think that’s a good calculation.

Thanks. Rapid access to data is the key without going though hoops to get there. openzfs might be something to look at.

Windows, for once, has the absolute lowest tier of support here, so do check how good it is for your needs.

Thanks
I understand that most of the users on this site are purists. A perfect DR approach is to have a duplicate Truenas environment at an offsite location that the backup zfs replication could be sent to and rapidly stood up. Gaining rapid access to data is the critical point here without a lot of bells and whistles. The DR site is unknown and the expertise is unknown. Even installing an openzfs driver and going though the hoops to mount the pool might be too much to hope for. Then you still have to get the data moved to the new NAS which may be in the cloud etc…

I use both methods.

  1. Snapshot replication to a USB drive (encrypted)
  2. File backup to another USB drive (Bitlocker encrypted) with a PC backup program (and a 3rd one of the critical files with the same method).

All these are kept in my work office and I bring them to my home one by one for the backup every or other weekend.

The reason for method 1 is to have an exact copy of snapshots with the ZFS afvantages even for a singl disk

The reason for method 2 is if I go away together with my NAS, my children will have an easy way to access important files (I have given the keys to them).

The reason for 2 different methods is because I am a noob, If I make a mistake in one backup process, probably it will not be in the other method. It can also save me from the unlikely event of a software bug affecting one of the previous backup methods.

2 Likes