I deleted something... am I screwed?

Status
Not open for further replies.
Joined
Mar 26, 2017
Messages
20
Hi,

I did some dumb stuff which led me to have missing data. What I have left is some snapshots, how far back do I need to go to get my data back? I keep getting mixed up on the refer vs used stuff.

Do I take it back to tank@manual-20170311 to save my 10.6TB of data? or to some other one.

Code:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo} span.s1 {font-variant-ligatures: no-common-ligatures}

[root@freenas] /mnt/tank/Media# zfs list -t snapshot

NAME													USED  AVAIL  REFER  MOUNTPOINT

freenas-boot/ROOT/Corral-10.0.2@2017-03-25-22:06:53	1.04M	  -  1.11G  -

freenas-boot/ROOT/Initial-Install@2017-03-26-03:50:48  3.26M	  -  1.11G  -

tank@manual-20170311								   11.3M	  -  10.6T  -

tank@auto-20170312.0900-2y							 5.87M	  -  10.6T  -

tank@auto-20170323.0900-2y							 12.8K	  -  10.6T  -


Thanks!
 
Joined
Dec 2, 2015
Messages
730
When did you delete the data? If you deleted it after 9:00 on March 23, then the snapshot
tank@auto-20170323.0900-2y should contain the missing data. If you deleted it before that time, then that snapshot won't have the data, and you'll need to try tank@auto-20170312.0900-2y or tank@manual-20170311.

Assuming you are running FreeNAS 9.10.X (a guess, as you didn't bother to tell us which version), you can clone a snapshot in the GUI (see page from the docs). Click the Clone icon to the right of the desired snapshot. This will create a new dataset with the contents of the snapshot. Copy the data you want from there, then destroy that new dataset.

Good luck
 
Joined
Mar 26, 2017
Messages
20
I was using 9.10 then updated to Corral. The data got deleted sometime after the change to Corral when I was purging jails and got over zealous.

I'm confused as to what the "used" vs "refer" stand for.

Is the refer, referring to the data that is dead? If so why is it on all of the available snapshots for tank? Would rolling back actually make the data reappear? I don't think I checked the box to delete the data as well in my excitement.

Thanks for the assistance!
 
Joined
Dec 2, 2015
Messages
730
"refer" is the amount of data you would get if you cloned the snapshot. "used" is the actual amount of disk space used to store the snapshot on disk today. It is a small number, because snapshots don't contain a duplicate copy of any data that hasn't changed from the time the snapshot was created. They contain pointers to any unchanged data, plus pointer to a copy of any changed data (this changed data is what is taking up the space used by the snapshot). Note: this explanation is a bit of a simplification, and isn't 100% technically perfect.

You should be able to do the same sort of "clone snapshot, copy data" thing with Corral as I described with FN 9.10, but I'll leave it to you to read the docs, as I'm not using Corral yet.

Note: the snapshots you've listed only contain data from "tank" and the boot drive. If the data you deleted was not on "tank" or the boot drive, then those snapshots won't help you. But, if it was on "tank", then you should be in good shape.
 
Joined
Mar 26, 2017
Messages
20
This cloning thing has to be handed over SSH as it seems there is not yet a GUI implementation.

What I want to do is create a clone of the deleted folder /mnt/tank/Media which was removed based on one of the snapshots (I don't really care which one).

what commands would I use?

Code:
[root@freenas] /# zfs clone tank@auto-20170323.0900-2y tank/clone

Unsupported share protocol: 1.


Any Thoughts? Is the command valid?
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
Try using tank/myclone instead of tank/clone. It might have nothing to do with the error, but since clone is a command, it would be an unwise name for a dataset.
 
Joined
Mar 26, 2017
Messages
20
hmm, still the same error.

Code:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo} span.s1 {font-variant-ligatures: no-common-ligatures}

[root@freenas] /# zfs clone tank@auto-20170323.0900-2y tank/myclone

Unsupported share protocol: 1.
 
Joined
Dec 2, 2015
Messages
730
Maybe it is time to restore that data from backup.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Roll back to freenas 9.10 and use the GUI. I have a feeling you don't know what you are doing so having the GUI safety net is going to be a good thing.

Sent from my Nexus 5X using Tapatalk
 
Joined
Mar 26, 2017
Messages
20
I have no clue what I don't know, and just enough knowledge to be very dangerous, lol.
I think going to 9.10 makes sense.

So where would I find out what the "Unsupported Share Protocol: 1" means?
 
Joined
Mar 26, 2017
Messages
20
so I went to the manual and it looks like what was missing for me was adding the -p! I now have my data back!

You folks ROCK! Thanks

Code:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures} span.s2 {text-decoration: underline ; font-variant-ligatures: no-common-ligatures}

zfs clone [-p] [-o property=value]... snapshot filesystem|volume


		Creates a clone of the given snapshot. See the "Clones" section for

		details. The target dataset can be located anywhere in the ZFS

		hierarchy, and is created as the same type as the original.


		-p	  Creates all the non-existing parent datasets. Datasets

				created in this manner are automatically mounted according to

				the mountpoint property inherited from their parent. If the

				target filesystem or volume already exists, the operation

				completes successfully.


		-o property=value

				Sets the specified property; see "zfs create" for details.q
 
Status
Not open for further replies.
Top