Month: September 2024

ZFS Send Volume Receive to File

I wanted to take and send a snapshot of a ZFS volume which contains a user home dir to a freshly installed laptop.

mr@server:~$ zfs snap tank/myvol@wednsday

mr@server:~$ zfs list -t snapshot 
NAME			USED  AVAIL	REFER	MOUNTPOINT
tank/myvol@wednsday	22.6M	-	61.0G	-

Ok we know its 61G, I’m going to make an empty file a little bigger just in case. Then make a zfs pool out of it:

root@laptop# dd if=/dev/zero of=/zfsfile bs=1G count=80 
root@laptop# zpool create zfspool /zfsfile 

Now to send it:

root@server:~# zfs send tank/myvol@wednsday | ssh 172.16.0.236 zfs recv zfspool/myvol