ZFS - Send and recv backup
So I needed a way to backup all my jails. Lucky for me all my jails are run in a ZFS dataset. ZFS to the rescue.
First. Allow your datasets to be {snapshot,send,hold} by your normal user on the jail server to avoid using root.
sudo zfs allow -u <user> hold,send,snapshot zroot/usr/jails/jail1
Then create the recursive snapshot.
zfs snapshot -r zroot/usr/jails/jail1@backup
Then we also need to prep the receiving side so that your normal user can receive the backups.
zfs create zpool/backup
sudo zfs allow -u <user> create,mount,receive,compression zpool/backup
sudo chown <user> /zpool/backup