DHoffman2

updated

1 year ago

D

DHoffman2

2 Intern

306 Posts

0

15407

December 9th, 2014 11:00

Restoring a folder from a snapshot?

This may be a grossly level 1 question.  But,  from CLI can I restore a users folder from a snapshot to their current folder?  Copying data from the snapshot to their home folder is taking forever.  If so can someone show me what that syntax may look like?

Thanks,

  • DHoffman2

    2 Intern

    306 Posts

    8336

    0

    Posted December 10th, 2014 05:00

    Interesting this was marked as answered, by someone other than me.   But I digress.

    I actually DID find the syntax to use from the admin guide..

    I ran "isi snapshot snapshots list"

    found the snap I wanted to restore from. 

    Navigated to the share with the .snapshot in the path for example /ifs/.snapshot/Prod_daily_2014-12-03-_20-00/primary/nas/xyz/abc

    ran the command cp -R * /ifs/primary/nas/xyz/abc

    worked great.

  • AdamFox

    254 Posts

    6513

    1

    Posted December 9th, 2014 11:00

    You can revert an entire snapshot by starting the SnapRevert job but that doesn't sound like what you want to do.  You could try running the copy on the cluster itself and the network traffic.

    If the home directory has a ton of files, it will take a long time regardless of where you do it.  But running it on the cluster could eliminate some of the work in the process.

  • 6512

    1

    Posted December 9th, 2014 13:00

    I believe that there is way using DomainMark with SnapRevert but I haven't had a chance to test it yet.

    I'll include what my SE sent me and you can experiment.  I haven't validated this AT ALL.

    Keep in mind that this wipes out everything in that directory. The whole domain mark part is what allows us to make the folder ReadOnly during the duration of the restore process.  It makes it a bit more confusing than necessary.

    kcisilon1-1# isi snapshot list

    ID   Name Path

    ---------------------------------------------------------

    2    testing123 /ifs/Share01

    4    Snapshot: 2014Nov21, 11:10:25 AM /ifs/Share01

    6    ScheduleName_duration_2014-11-21-_11-15 /ifs/data

    7    testingabc /ifs/data

    ---------------------------------------------------------

    kcisilon1-1# isi job start DomainMark --root=/ifs/Share01 --dm-type SnapRevert

    Started job [134]

    kcisilon1-1# isi job start SnapRevert --snapid 2

    Started job [135]

  • AdamFox

    254 Posts

    6517

    0

    Posted December 9th, 2014 13:00

    I can run a quick test in my lab.  I could be wrong on this, but that's just how I've always understood it.

    But it's simple enough to test

  • AdamFox

    254 Posts

    6517

    0

    Posted December 9th, 2014 13:00

    Right, but that will do the entire snapshot, not a subdirectory of the snap.  That is the key difference.

  • 6517

    0

    Posted December 9th, 2014 13:00

    Is there no way to restore just a piece of the snap?  Isn't that what DomainMark is for?

    If we can't restore it, it really pushes customers to snapshot at lower levels which is not what we really want.

  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    6517

    0

    Posted December 9th, 2014 14:00

    , it was good to chat with you last Tuesday (NFSv4 conversation)

    Honestly i did not know about SnapRevert, is it an incremental restore or it will overwrite everything in the original location ?

  • crklosterman

    450 Posts

    2567

    4

    Posted December 9th, 2014 14:00

    Adam…

    The domainmark must be done at the same path that the snap is taken at.  Think of it this way, on a VNX its really easy to define what data you’re protecting with a checkpoint, right?  A single UXFS filesystem with a max size of 16TB.  How can you restore a VNX snap?  The whole thing or manually copy the data back, period.  Snaprevert works the same way, but for snaprevert to work, it has to understand the boundaries of the data the snap encompases. That's where the domainmark comes into play.  You run the domainmark so that the cluster understands those boundaries.  SyncIQ has an identical concept that's part of the resync-prep job.  The domainmark only has to be run once.  Protection Domains are used really for four things:

    1. SyncIQ

    2. SnapshotIQ

    3. SmartQuotas

    4. SmartLock


    Want to view the domains on your cluster? Run isi domain list, or isi_classic domain list (depending on your version of OneFS)

    Hope this helps,

    Chris Klosterman

    Senior Solution Architect

    EMC Isilon Offer and Enablement Team

    Email: chris.klosterman@emc.com

    Twitter: @croaking

  • AdamFox

    254 Posts

    2567

    1

    Posted December 9th, 2014 14:00

    Good to talk to you too.  I thought that was you.

    But SnapRevert should wipe out everything and make it exactly like the snapshot.  If you want to do an incremental restore, you can do that via some form of copy with the proper flags to not over-write a new file, etc. 

  • AdamFox

    254 Posts

    6517

    1

    Posted December 9th, 2014 14:00

    So far, my lab is confirming what I thought.  When I do the DomainMark on the root of the snap, the SnapRevert works.  If I do the DomainMark on a subdirectory, the SnapRevert fails.

    I'd love to be wrong on this, but so far it doesn't appear to be so.  If I get any new info, I'll pass it along and, certainly, if anyone else can make this work, please post it here.