zfs

ZFS: export dataset

zpool import 917239494398087781 bpool-old
 
ZFS_DATASET=rpool/USERDATA/foo_g7a1a3
zfs set mountpoint=legacy ${ZFS_DATASET}
mount -t zfs ${ZFS_DATASET} /mnt
zfs list ${ZFS_DATASET}
du -sh /mnt/*
ls -la /mnt
 
tar -C /mnt --use-compress-program=pbzip2 -cf /media/backup/${ZFS_DATASET////_}.tar.bz2 .
 
# delete datasets
zfs destroy ${ZFS_DATASET}
 
# delete pool
zpool destroy ${ZFS_DATASET}

ZFS filesystem on Linux

Create ZFS filesystem
apt install -y zfsutils-linux
zpool create tank /dev/system/lxd
zfs create -o mountpoint=/var/lib/lxd2 tank/lxd

boot Ubuntu 16.04 LiveCD
terminal
sudo apt-get install -y ssh
sudo passwd ubuntu
ip a

Mount all datasets
zfs mount -a

SSH login to Ubuntu LiveCD
ssh ubuntu@

sudo su

sudo apt-add-repository universe
sudo apt update

apt install -y debootstrap zfs-initramfs

# rmove previous ZFS pool
zpool export rpool

DEVICES="