This post is more than 5 years old
306 Posts
0
14706
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
306 Posts
0
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
1
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.
Anonymous User
170 Posts
1
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
0
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
0
December 9th, 2014 13:00
Right, but that will do the entire snapshot, not a subdirectory of the snap. That is the key difference.
Anonymous User
170 Posts
0
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
2 Intern
2 Intern
•
20.4K Posts
0
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
4
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
1
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
1
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.
AdamFox
254 Posts
0
December 9th, 2014 14:00
I'm still playing with it because it's bugging me. I'm not finding much use for the DataMark step but everything I read says you should do it. The SnapRevert job takes a snapID as an argument and that seems to handle that piece well.
I'll check with the brain trust as well. This kind of crap bugs me when I think I understand something and then I realize I don't know it as well as I thought I did.
dynamox
2 Intern
2 Intern
•
20.4K Posts
0
December 9th, 2014 14:00
so there is no reason to use DomainMark, SnapRevert is sufficient to roll back to specific snapshot ? (how do you specify what snapshot you want to roll back to ? )
AdamFox
254 Posts
0
December 9th, 2014 14:00
Interesting, but doesn't the snapid define the root of the snap anyway, so if I tell it to revert to snapid=123, shouldn't it be clear that I want to restore the path of that snap, since it's all or nothing anyway?
Peter_Sero
1.2K Posts
0
December 10th, 2014 00:00
Nevertheless, SnapRevert doesn't work without prior DomainMark. Think of two kinds
of snapshots, normal (old) ones and "revertible" ones.
Anonymous User
170 Posts
0
December 10th, 2014 07:00
"works great" is relative. If the dataset is large, this can be a very lengthy operation - perhaps days - since it's actually doing a copy of the files. Ideally, we should be able to revert the data from a subset of the snapshot by just manipulating metadata pointers. I had to revert a 35TB accidental deletion the other data. It wasn't pretty. And to make matters worse, that data is now treated as new so it starts snapshotting that data while still having the old snapshots lying around until they expire. And put SyncIQ on top of that data and the problem intensifies.
SnapRevert is too simplistic for me in its current state. If I have 100 projects under /ifs/project, and I'm snapshotting at /ifs/project, I can't revert the data for just one project without wiping out the other 99.