ZFS send / recv with external USB peripheral

Hi all,
I’m testing an external USB drive as a one-off backup. I can send / recv without any problem. However, as soon as I reattach the USB drive again, the datasets are mounted on the same paths. Not a fun place to be in.

I could set the canmount property after the receive but I’m wondering if there is another way to achieve this.

Thanks for any help
 
Set the canmount property of the top-level dataset of the receiving pool to off and don't use the top-level dataset for receiving the backups but a descendant of it. Alternative is to always import the backup pool with altroot set, e.g.:

zpool import -R /mnt zbackup
 
In the end, seems that the best way is to use the -N flag when you import the USB pool. Do you see any downside?
 
Back
Top