What could be the best/wise way to backup a ZFS pool’s data to multiple USB-drives?
Automatically continuous/reliable backups:
-
Full + incremental backup e.g. once a week (USB-drives are kept connected, but need to be “turned off”/ spin down when not in use)
-
Quartely Full backup to (drives that have their own power turned off after a backup so TrueNAS would see them as disconnected)
– Maybe these could even be combined to avoid unnecessary double backups? -
Data does not fit to a single USB drive (needs a smart way to split data to multiple drives).
– Needs ability to alert when the space running low in the USB-drives that are used in the backup. -
Need to support ability to add more USB-drives when data does not fit in the ones that are connected or used in the “backup cycle”.
-
Many USB-drives are DM-SMR (with no trim support) (Fast in sequential backup, not so ok in ZFS, or has this changed?)
-
USB-drives are diffrent size so maintaining a separate “backup zfs-pool” from them is not practical? Does exsample TrueNAS Scale support Btrfs (that support/handle diffrent size drives ok, but is it’s raid5 stable enough?) or someting else that this could be wise and supported way?
-
The USB-drives need to be able to be “spindown/sleep” when backup job is not running (to increase life and minimize energy consumption).
-
Would need to support easy removing the USB-drives (for offline backups).
– Ideally when a disconnected USB-drive that is used for continous backups is connected back, it would automaticly work for backup. Without having to manually setting the drive back in use.
– Would be nice to have automation support (smart power socket that could be controlled by the system to bring power back to USB-drive when its time to backup). -
Needs ability to set how many backup copies are kept and delete the old ones automaticly.
-
Timing of backup jobs (ideally diffrent timings for difrent directories/files from the pool).
-
Needs to support keeping original file modifications / creation times and that they can be restored. ACL are plus, but not mandatory.
-
Compression support (must be able to restore individual files without having to extract all data)
– mount compressed filesystem and/or view compressed files “like Windows can use zip files as a folder”) support.
– Ideally compression/etc should help to use big (256MB) cluster or even files? in the filesystem of the USB-drive that suits SMR drives well so they wont slow down or waste space? -
Open source
-
Ideally the solution would work in the old 12 series TrueNAS Core (help in backup/upgrade), latest TrueNAS Core and Scale.
-
GUI prefered, easy to edit conf files or script files+cron?
–Ideally it can be made/instructed easy enough for even novice to operate safely (reduses mistakes even for pro’s in the long run
If not possible to implement in TrueNAS alone?
– VM in the same host could be an option. Connect the USB-drives to this VM and use it to do the backup process if it can talk to TrueNAS ok?), recomendations and how?
Maybe I am over thinking this? If the list is impossble to accomplish, how would you do it?
– Also what important did I miss?
ps. English is not my native language, sorry about the grammar.