Getting data from ZFS.

Hi all,

A customer has a very active ZFS partitionon their production system, I need to get a copy of the data under one directory at a specific point in time.

Is it possible to do this with the ZFS snapshot/clone tools, (and what commands should be used to capture the info I require for export from their platform)?

The following is my understanding of what I should do, corrections and clarifications are very welcome.

zfs snapshot $DEVICE@now
cd $MOUNT_POINT
cd .zfs
tar -cvf $HOME/data.tar path/to/directory/of/interest
zfs destroy $DEVICE@now

How wrong am I, do I need to clone the filesystem to access data, if so how...

Hi,

Probably better to use the zfs send and recieve for this as follows;

zfs snapshot $DEVICE@now
zfs send $DEVICE@now | zfs receive -Fu new/device

This is probably a better way of doing it, if it's to an other system then you can use the following format;

zfs send nemop-prd/nemop_oradata@130911 | ssh su10sb000 zfs recv nemop_uat/nemop_oradata

Regards

Dave Munro

1 Like

Sorry to be dumb about this, but I need to take the data out of their live environment in order to validate the data in place.

Does new/device become a clone of the original at the time of the snapshot?

How do I set up new/device, customer has a philosophical objection to key exchange !!

Hi Skrynesaver,

The snapshot is a PIT copy of all the data in the ZFS, the new device can be an other ZFS that you created.

The ZFS snapshot will grow - quickly if there is a lot of write activity, but the send and recieve operation will send an exact copy of the required data to the new location.

If the customer has a big down on the key exchange then use the following;

zfs send -Rv jumpstart@s030s4711 | ssh root@s030s4712 zfs receive -F jumpstart

Regards

Dave

1 Like

Thanks guys I owe more people a beer :wink:

Hi Skrynesaver,

cd /
more beer

Regards

Dave

If you get an SSH escape sequence in your data, the send will be corrupted. You need to disable ssh escape characters:

zfs send nemop-prd/nemop_oradata@130911 | ssh -e none su10sb000 zfs recv nemop_uat/nemop_oradata