Page 1 of 1

Help with ZFS Send/Recv

PostPosted: Thu Dec 10, 2015 6:06 pm
by mstan
I just created a new backup pool to backup the main pool and tried to use zfs send/recv but I get the error messages below. I generally don't have any zfs datasets, just the pools them selves populated by folders created by Mac OS Finder. However, I did create a "test" dataset in the example below thinking that was maybe required but nit didn't work. So how do you copy one pool to another on the same system?

~ xxxx$ sudo zfs send ExternalZFSPool2/test@thursday | zfs recv BackupPool
cannot receive new filesystem stream: destination 'BackupPool' exists
must specify -F to overwrite it
warning: cannot send 'ExternalZFSPool2/test@thursday': Broken pipe
~ xxxx$ sudo zfs send ExternalZFSPool2/test@thursday | zfs recv BackupPool/backuptest
cannot receive new filesystem stream: permission denied
warning: cannot send 'ExternalZFSPool2/test@thursday': Broken pipe

Re: Help with ZFS Send/Recv

PostPosted: Sat Dec 12, 2015 4:30 pm
by rottegift
The zfs receive also needs correct permissions; in your second example, you should put a sudo in between the "|" and the "zfs recv" too.

In your first example, as it says, you would have to overwrite whatever's in the destination pool's top level, and thus need to supply an -F as well as a sudo.

Re: Help with ZFS Send/Recv

PostPosted: Sun Dec 13, 2015 6:25 pm
by mstan
Thanks for pointing that out. I had thought that one sudo was sufficient but now know better. I will try this again after my little detour into snapshot rollbacks.

I just did a rollback and thought it hadn't worked because the restored files didn't appear in Finder for a long time. After about 30 minutes or so the files appeared in Finder - much longer than usual wait for size calculations when browsing the ZFS volumes. Sure hope the OpenZFS guys can fix this lag soon.