Emergency - restore a deleted zfs snapshot


 
Thread Tools Search this Thread
Operating Systems Solaris Emergency - restore a deleted zfs snapshot
# 1  
Old 08-05-2011
Emergency - restore a deleted zfs snapshot

Hi, I deleted a zfs snapshot because it was as big as the original zfs. After the snapshot was removed, all the data in the original zfs is gone. How this happened? Can I restore the snapshot? Please help. Thanks a lot!

Last edited by aixlover; 08-05-2011 at 09:31 AM..
# 2  
Old 08-05-2011
How did you delete the snapshot? Using zfs destroy?
# 3  
Old 08-05-2011
Yes. I used zfs destroy.

Anyway to get it back?
# 4  
Old 08-05-2011
It would help if you provide more details about what you (really) did. Destroying a snapshot shouldn't have destroyed the associated file system.

Please post the last lines of:
Code:
zpool history

# 5  
Old 08-05-2011
Here is what I've found:

Before deleting the snapshot, both the original ZFS Z and its snapshot showed 130 GB used. After Z's snapshot was deleted, Z shows 500KB used.

Actually our DBA removed almost all of the data in Z. That must be why the snapshot showed as much space as Z used.

After its snapshot was deleted, Z was nearly empty.

Make sense??

Btw, 'zpool history' does not show zfs command history.
# 6  
Old 08-05-2011
Quote:
Originally Posted by aixlover
Before deleting the snapshot, both the original ZFS Z and its snapshot showed 130 GB used. After Z's snapshot was deleted, Z shows 500KB used.
Actually our DBA removed almost all of the data in Z. That must be why the snapshot showed as much space as Z used.
After its snapshot was deleted, Z was nearly empty.
Make sense??
Okay, so as I suspected almost all of the data was removed from the Z file system. As long as you were having a snapshot available, the removed data was still on disk and reachable through it. Destroying the snapshot was the bad move. There is probably not that much you can do now (easily) to recover your data. Perhaps something could have been done should you have exported the pool immediately after the zfs destroy.
Quote:
Btw, 'zpool history' does not show zfs command history.
meaning you aren't running a recent Solaris 10 update. I believe logging zfs logging was added four years ago.
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

How do I mount a ZFS snapshot?

I created a zpool and in it there is a zfs volume. I used that to backup data on another server using ISCSI. Now I have the data and want to take a snapshot so that I can view it on another machine that is not in production. Here is what I have done # zfs snapshot mat/vol_1@snap1 # zfs list -t... (6 Replies)
Discussion started by: SIFT3R
6 Replies

2. Solaris

zfs - get the name of the last snapshot

I have installed Solaris 11 Express on my server and want to set up automatic backuping using zfs snapshots. In the backup script I need to find out the name of the last snapshot of the given filesystem (in order to refer to it as the startpoint of an incremental backup). What is the best way to do... (4 Replies)
Discussion started by: RychnD
4 Replies

3. Solaris

ZFS snapshot query

I saved one of my zfs snapshot on the remote machine with following command. And now i want to restore the same snapshot to original server how can i receive it on the original server from backup server. #zfs send rpool/ROOT/sol10_patched@preConfig | ssh x.x.x.x zfs receive... (1 Reply)
Discussion started by: fugitive
1 Replies

4. Solaris

ZFS snapshot issue.

I 've a weired situation .. my system has zfs root as its file system and now root file system is full at 100% # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 134G 65.2M 94K /rpool rpool/ROOT ... (1 Reply)
Discussion started by: fugitive
1 Replies

5. Solaris

Need to take snapshot in solaris (using ZFS or ....)

Hi, I am working on Network Management Software product. This is supported both windows and solaris platform. I need to take the snapshot of the solaris server ( which installed our product), like vmware in windows. I think using ZFS files system, we can take the snapshot in solaris 10 but... (2 Replies)
Discussion started by: mgmk.84
2 Replies

6. UNIX for Advanced & Expert Users

Need to take snapshot in solaris (using ZFS or ....)

Hi, I am working on Network Management Software product. This is supported both windows and solaris platform. I need to take the snapshot of the solaris server ( which installed our product), like vmware in windows. I think using ZFS files system, we can take the snapshot in solaris... (1 Reply)
Discussion started by: mgmk.84
1 Replies

7. Solaris

backup,restore and ufs snapshot

dear all, i want to perform back up,restore and snapshot activities in the hard disk using solaries 10. how can i do this, can any body provide me step by step precedure for that. waiting for reply. al amin (2 Replies)
Discussion started by: alamin
2 Replies
Login or Register to Ask a Question