Go Back   The UNIX and Linux Forums > Homework and Emergencies > Emergency UNIX and Linux Support !! Help Me!!


Emergency UNIX and Linux Support !! Help Me!! Post your urgent questions here for highest visibility. Posting a new thread to this forum requires Bits. We monitor this forum to help people with emergencies, but we do not guarantee response time or answers. This forum is "best effort" only. Members who reply to posts here receive a bonus of 1000 Bits per reply.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-15-2012
Skrynesaver's Avatar
Grumpy old geek
 
Join Date: Mar 2011
Location: Éire
Posts: 662
Thanks: 19
Thanked 147 Times in 144 Posts
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.

Code:
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...
Sponsored Links
    #2  
Old 06-15-2012
Registered User
 
Join Date: Dec 2004
Location: Isle-of-Skye
Posts: 231
Thanks: 7
Thanked 26 Times in 26 Posts
Hi,

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


Code:
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;


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

Regards

Dave Munro
The Following User Says Thank You to gull04 For This Useful Post:
Skrynesaver (06-15-2012)
Sponsored Links
    #3  
Old 06-15-2012
Skrynesaver's Avatar
Grumpy old geek
 
Join Date: Mar 2011
Location: Éire
Posts: 662
Thanks: 19
Thanked 147 Times in 144 Posts
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 !!
    #4  
Old 06-15-2012
Registered User
 
Join Date: Dec 2004
Location: Isle-of-Skye
Posts: 231
Thanks: 7
Thanked 26 Times in 26 Posts
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;


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

Regards

Dave
The Following User Says Thank You to gull04 For This Useful Post:
Skrynesaver (06-15-2012)
Sponsored Links
    #5  
Old 06-15-2012
Skrynesaver's Avatar
Grumpy old geek
 
Join Date: Mar 2011
Location: Éire
Posts: 662
Thanks: 19
Thanked 147 Times in 144 Posts
Thanks guys I owe more people a beer
Sponsored Links
    #6  
Old 06-15-2012
Registered User
 
Join Date: Dec 2004
Location: Isle-of-Skye
Posts: 231
Thanks: 7
Thanked 26 Times in 26 Posts
Hi Skrynesaver,

cd /
more beer

Regards

Dave
Sponsored Links
    #7  
Old 06-16-2012
Registered User
 
Join Date: Jun 2009
Posts: 492
Thanks: 0
Thanked 59 Times in 57 Posts
Quote:
Originally Posted by gull04 View Post
Hi,

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


Code:
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;


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

Regards

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


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

Sponsored Links
Closed Thread

Tags
snapshot, solaris, zfs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get data only inside polygon created by points which is part of whole data from file? reva UNIX for Dummies Questions & Answers 7 04-12-2010 11:27 AM
Extract data based on match against one column data from a long list data patrick87 Shell Programming and Scripting 12 11-17-2009 03:27 AM
Howto capture data from rs232port andpull data into oracle database-9i automatically boss UNIX for Dummies Questions & Answers 1 09-23-2007 02:35 AM



All times are GMT -4. The time now is 01:59 PM.