Help understanding what I did wrong with snapshot file recovery?

surfrock66

Dabbler
Joined
Apr 2, 2013
Messages
36
I needed to pull a file out of a snapshot, but I did something wrong and seem to have pretty seriously messed up my setup. Fortunately this is a backup location for live data running on other servers so nothing was really lost, but I'm confused what I did and how to fix where I'm at.

I needed to pull a file I overwrote from a snapshot. I found the snapshot, in the gui I cloned it to a new dataset. I went in via ssh, copied what I needed out, then tried to delete the dataset, and the option was greyed out. I googled it, they said I had to promote the new dataset using "zfs promote" which I did, then the result said to do a zfs destroy of the dataset, which prompted for a -r and -R. I did that, and it wiped out several of my other datasets from my main pool before I stopped it. Again, no data loss, I have other sources. I confirmed in my console log, the command was "zfs destroy -Rr sr66-nas-v01/auto-20210622.0830-2w-clone"

Here are my datasets on this nas (after rebuilding, mid repopulate):

Code:
sr66-nas-2# zfs list | grep sr66
sr66-nas-v01                                                  5.56T  11.9T      510M  /mnt/sr66-nas-v01
sr66-nas-v01/.system                                           801M  11.9T      794M  legacy
sr66-nas-v01/.system/samba4                                    735K  11.9T      735K  legacy
sr66-nas-v01/.system/syslog-adb946163d914f088dc14617dbc0bec3  6.46M  11.9T     6.46M  legacy
sr66-nas-v01/Documents                                        66.1G  11.9T     66.1G  /mnt/sr66-nas-v01/Documents
sr66-nas-v01/Games                                             311G  11.9T      311G  /mnt/sr66-nas-v01/Games
sr66-nas-v01/HealthEducation                                  84.7G  11.9T     84.7G  /mnt/sr66-nas-v01/HealthEducation
sr66-nas-v01/Music                                            79.8G  11.9T     79.8G  /mnt/sr66-nas-v01/Music
sr66-nas-v01/Pictures                                         14.8G  11.9T     14.8G  /mnt/sr66-nas-v01/Pictures
sr66-nas-v01/TJGBackup                                        1.02G  11.9T     1.02G  /mnt/sr66-nas-v01/TJGBackup
sr66-nas-v01/Videos                                           5.02T  11.9T     5.02T  /mnt/sr66-nas-v01/Videos
sr66-nas-v01/auto-20210622.0830-2w-clone                       510M  11.9T      509M  /mnt/sr66-nas-v01/auto-20210622.0830-2w-clone
sr66-nas-v01/bitcoinbackup                                     192K  11.9T      192K  /mnt/sr66-nas-v01/bitcoinbackup
sr66-nas-v01/litecoinbackup                                    192K  11.9T      192K  /mnt/sr66-nas-v01/litecoinbackup



So, I recreated my datasets, repopulated my NAS, good to go. I still have this dataset I want to get rid of, but when I go in the GUI now and do the delete (it's there now) it tells me there are dependent datasets, and it's all my root datasets in the pool again.

Additionally, I purged the snapshots (I didn't need them on this NAS), however a single snapshot won't be deleted...the one I cloned to a new dataset.

Is there a safe way to delete the cloned snapshot dataset, and the 1 remaining snapshot?
 
Top