ZFS snapshot, ZFS send | receive
FreeBSD 14.1-RELEASE


<-----69------------------------------------------------------------>

Prepare a storage disk to store ZFS snapshots as back ups.

Part 1 - prepare the storage disk
Check the current condition of the disk
% geom disk list
da0
% ls /dev/da0 tab
da0% da0p1% da0p2% da0p3%

Destroy existing partition scheme
# gpart destroy -F da0
da0 destroyed

Create new partition table
# gpart create -s gpt da0
da0 created

Create new freebsd zfs partition
# gpart add -t freebsd-zfs -s 110g  -l zfs110gA da0
da0p1 added

Check if the partition is properly created
% gpart show -l da0

Create a zfs pool called "portapool" at the storage disk
The pool has no redundancy as a stripe
# zpool create portapool gpt/zfs110gA

Export pool from the system for cold storage
# zpool export portapool


Part 2 - create snapshot and back it up to the external pool
List available pools
# zpool import
pool: portapool

Import pool to the system
# zpool import -o altroot=/mnt portapool

Check if pool is properly imported and available
# zpool list
portapool
zroot

Create zfs snapshot of the dataset that we want to be backed up
# zfs snapshot zroot/usr/home@2025-02-XX

Check if snapshot is properly created
% zfs list -t snapshot
. . . . . zroot/usr/home@2025-02-XX

Back up the snapshot to the external pool
% sudo zfs send -v zroot/usr/home@2025-02-XX |
      sudo zfs receive portapool/machinenamehomebu

and it just works!

Export pool from the system for cold storage
# zpool export portapool

Many thanks to,
Vermaden https://vermaden.wordpress.com/ for his help and patience

Michael W Lucas https://mwl.io/ and
Allan Jude http://www.allanjude.com/
     for their excellent books
       - Absolute FreeBSD
       - FreeBSD Mastery: ZFS
       - FreeBSD Mastery: Advanced ZFS

The FreeBSD and ZFS developing community for the high quality software
and the very helpful documentation