> From: opensolaris-help-boun...@opensolaris.org [mailto:opensolaris- > help-boun...@opensolaris.org] On Behalf Of melbogia > > Hi, > I am trying to send a zfs filesystem to a remote server and I get an > error after it completes. > > pfexec /usr/sbin/zfs send datapool/dumps/arch...@zfs-auto-snap:daily- > 2010-04-05-00:00 | ssh r...@machine2 "/usr/sbin/zfs receive > datapool/dumps/archive" > > cannot mount '/datapool/dumps/archive': directory is not empty
I don't know what's wrong in your situation, but I know zfs send | zfs receive can be very sensitive to precisely how they're called, and in fact the behavior can be different from one version of the OS to next. So here's what I do, and it may or may not be helpful to you. To send the full filesystem, I find I need to destroy all the snapshots on the receiving filesystem, but it's ok to leave the actual receiving filesystem without any snapshots, provided you have enough empty disk space to receive the whole new FS in addition to the existing FS. That way, if anything goes wrong with the send & receive, you haven't obliterated the receiving FS yet. The receiving FS only gets clobbered after successful send & receive. zfs snapshot localpool/localfilesys...@whateversnapshot ssh remoteserver 'zfs create remotepool/remotefilesystem' ssh remoteserver 'zfs set readonly=on remotepool/remotefilesystem' zfs send localpool/localfilesys...@whateversnapshot | ssh remoteserver 'zfs receive -F remotepool/remotefilesys...@whateversnapshot' _______________________________________________ opensolaris-help mailing list opensolaris-help@opensolaris.org