James Andrewartha
2008-01-17 15:39:02 UTC
Hi,
I have a zfs filesystem that I'd like to move to another host. It's part
of a pool called space, which is mounted at /space and has several child
filesystems. The first hurdle I came across was that zfs send only works
on snapshots, so I create one:
# zfs snapshot -r ***@musundo
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
***@musundo 0 - 25.9G -
space/***@musundo 0 - 31K -
space/***@musundo 924K - 52.4G -
space/***@musundo 0 - 38K -
space/freebsd/cvs-***@musundo 0 - 36K -
space/freebsd/***@musundo 0 - 4.11G -
space/***@musundo 0 - 47.6G -
space/***@musundo 352K - 14.7G -
space/netboot/manduba-***@musundo 0 - 95.5M -
space/netboot/manduba-freebsd/***@musundo 0 - 36K -
space/netboot/manduba-freebsd/***@musundo 0 - 327M -
space/netboot/manduba-freebsd/***@musundo 0 - 36K -
space/***@musundo 234K - 167G -
On the destination, I have created a zpool, again called space and
mounted at /space. However, I can't work out how to send ***@musundo
to the new machine:
# zfs send ***@musundo | ssh musundo "zfs recv -vn -d space"
cannot receive: destination 'space' exists
# zfs send ***@musundo | ssh musundo "zfs recv -vn space"
cannot receive: destination 'space' exists
# zfs send ***@musundo | ssh musundo "zfs recv -vn space2"
cannot receive: destination does not exist
# zfs send ***@musundo | ssh musundo "zfs recv -vn space/space2"
would receive full stream of ***@musundo into space/***@musundo
# zfs send ***@musundo | ssh musundo "zfs recv -vn ***@musundo"
cannot receive: destination 'space' exists
# zfs send ***@musundo | ssh musundo "zfs recv -vn ***@musundo"
cannot receive: destination does not exist
What am I missing here? I can't recv to space, because it exists, but I
can't make it not exist since it's the root filesystem of the pool. Do I
have to send each filesystem individually and rsync up the root fs?
Thanks,
James Andrewartha
I have a zfs filesystem that I'd like to move to another host. It's part
of a pool called space, which is mounted at /space and has several child
filesystems. The first hurdle I came across was that zfs send only works
on snapshots, so I create one:
# zfs snapshot -r ***@musundo
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
***@musundo 0 - 25.9G -
space/***@musundo 0 - 31K -
space/***@musundo 924K - 52.4G -
space/***@musundo 0 - 38K -
space/freebsd/cvs-***@musundo 0 - 36K -
space/freebsd/***@musundo 0 - 4.11G -
space/***@musundo 0 - 47.6G -
space/***@musundo 352K - 14.7G -
space/netboot/manduba-***@musundo 0 - 95.5M -
space/netboot/manduba-freebsd/***@musundo 0 - 36K -
space/netboot/manduba-freebsd/***@musundo 0 - 327M -
space/netboot/manduba-freebsd/***@musundo 0 - 36K -
space/***@musundo 234K - 167G -
On the destination, I have created a zpool, again called space and
mounted at /space. However, I can't work out how to send ***@musundo
to the new machine:
# zfs send ***@musundo | ssh musundo "zfs recv -vn -d space"
cannot receive: destination 'space' exists
# zfs send ***@musundo | ssh musundo "zfs recv -vn space"
cannot receive: destination 'space' exists
# zfs send ***@musundo | ssh musundo "zfs recv -vn space2"
cannot receive: destination does not exist
# zfs send ***@musundo | ssh musundo "zfs recv -vn space/space2"
would receive full stream of ***@musundo into space/***@musundo
# zfs send ***@musundo | ssh musundo "zfs recv -vn ***@musundo"
cannot receive: destination 'space' exists
# zfs send ***@musundo | ssh musundo "zfs recv -vn ***@musundo"
cannot receive: destination does not exist
What am I missing here? I can't recv to space, because it exists, but I
can't make it not exist since it's the root filesystem of the pool. Do I
have to send each filesystem individually and rsync up the root fs?
Thanks,
James Andrewartha