August 18, 2019 Vignesh Sathiyanantham 0Comment

When I am setting up the Disaster recovery plan for the MS SQL Databases in ZFS Volume, I faced permission issue while running ZFS send/receive command from a non-root account

root@vigneshzfs:/home/vignesh# sudo zfs send sql-pool/disk1@aug18 | ssh ubuntu@10.7.8.25 zfs recv aws-pool/sql-pool-aug18
ubuntu@10.7.8.25's password:
cannot receive new filesystem stream: permission denied

So my sender is vignesh and the receiver is ubuntu both are a non-root account

On the sender side, I used these permissions

sudo zfs allow -u vignesh send,snapshot,hold sql-pool

And on the receiver side

sudo zfs allow -u ubuntu compression,mountpoint,create,mount,receive aws-pool

After setting up this permission I can send and receive the snapshots of ZFS successfully

ubuntu@ip-:/dev$ zfs list -t snapshot
NAME                            USED  AVAIL  REFER  MOUNTPOINT
aws-pool/sql-pool-aug18@aug18     0B      -  30.4M  -

Also published on Medium.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.