1.2 KiB
1.2 KiB
title | date | draft | toc |
---|---|---|---|
ZFS send and recv | 2022-07-23T07:00:00+05:30 | false | true |
Step 0000: Configure SSH Access
On the sender's system:
cd ~/.ssh/
ssh-keygen -t ed25519 -f zfs_send
echo "
Host hostname.localdomain
Hostname <ip-addr>
User root
IdentityFile ~/.ssh/zfs_send
Port <port>
" | tee -a ~/.ssh/config
On the receiving system:
sudoedit /etc/ssh/sshd_config
[...]
PermitRootLogin yes
[...]
user $ sudo -i
root # echo "zfs_send.pub" | tee -a ~/.ssh/authorized_keys
sudo systemctl restart sshd
This guide was possible because of the amazing documentation of Klara Systems.
Step 0001: Delegate ZFS administration permissions to unprivileged users
On the sender's system:
sudo zfs allow -u USER send,snapshot,hold POOL
On the receiving end:
sudo zfs allow -u USER compression,mountpoint,create,mount,receive POOL
Step 0010: Send
sudo zfs snapshot <vol>@sendtest
zfs sent -v <vol>@sendtest | ssh hostname.localdomain zfs receive <pool>/backups/<vol-name>