ZFS Root on ZFS and backups.

Hi all,
If I have a root on ZFS pool, it is my understanding that if I zfs send the ZFS pool to some location, then the entire pool is backed up to that location, but that backup cannot be restored to root with zfs recv. If I have a system that has only four drives and I wish to aggregate these drives with a RAID 1+0 type setup without using a hardware RAID controller then obviously root on ZFS is a good option (plus all of the snapshotting capabilities of ZFS).

However, I'm a little unclear on a backup strategy in such a case. If I add filesystems to ZFS for data (and jail) storage and zfs send these filesystems instead, assuming that the OS install on root (all services run in jails on additional ZFS filesystems) can be sacrificed in the event of a catastrophic failure, then what would be the restoration procedure?

Given some exported filesystems, can these simply be zfs recv restored into an arbitrary root on ZFS pool, providing there is sufficient space in the pool?
 
If I understand you want to know how to backup and restore the "boot" drive of a zfs configuration (just like the c:\ drive of a Windows configuration)
Yes, you can.
It is not an immediate task, but doable.

This is my little "guide"

If you want to backup a NON "root drive" you can use almost "everything".
Typically three
- rsync (no need to restore)
- zfs replica (sanoid-syncoid) no need to restore, can use lots of space for intermediate snapshot, works fast even on "cloud" (via ssh to remote servers-local NAS if any with ZFS)
- archiver-based backups (zpaqfranz, store data virtually forever)

Given some exported filesystems, can these simply be zfs recv restored into an arbitrary root on ZFS pool, providing there is sufficient space in the pool?
Not on arbitrary root (?), but on arbitrary MOUNTPOINT.
Code:
zpool import -o altroot=/mnt -f mybakupchebelchebel

If you simply split the data from the software, say
/tank and /root, you can easily backup /tank (recursively) and restore (to /tank) on another system, just in case of a disaster

Short version: you can backup "everything" (zroot) and restore "everything" in case of failure, but require a bit of work.
If you split into zroot and /tank (for example), is way easier to backup and restore /tank

In your case (if possible) I would buy two small SSDs on which install (in mirror) zroot.
Then you will configure the 4 disks (HDDs I suppose) as /tank
 
fcorbelli Thank you for the guide you linked, that looks very useful.

Not on arbitrary root (?), but on arbitrary MOUNTPOINT.
Poor phrasing on my part, apologies. I meant restoring into an arbitrary pool that contains the system root. I'm wondering if there are any pitfalls or "gotcha" situations in doing this. However, your reply answers this for me, so thank you for that. It seems that the root of the system being in the ZFS pool makes no difference in this regard.
 
Back
Top