Help: Recover data lost from revert to snapshot?

This is for discussing general topics about how to use VirtualBox.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Help: Recover data lost from revert to snapshot?

Post by RickJ »

I had a windows go bonkers and during the panic shutdown I believe I clicke the "Revert to ??? snapshot" check box. When I brought everything back up again I was horrified that everything except windows was gone.

Is there a way to recover my data off the virtual disk that was lost by doing this revert thing?

I was running a Win2k guest on Kubuntu Hardy. I had a 10GB static virtual disk.

Please I need some hope of recovery.
Thanks.

P.S. I apologize for the noob post in the Windows Guest forum. I was panicked as you can imagine. Anyway I didn't have a clue what had happened to me then and so asked the wrong question inthe wrong place.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

If no new data was written or moved on the disk/partition that had your snapshot, you can recover the data with data recovery software. And that isn't perfect. Usually, the data is lost.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Post by RickJ »

Can you recommend a free or inexpensive data recovery software? Would I be looking for one that runs under the windows guest or the linux host?

I don't have much hope. I looked at the VDI file last night with a hex editor on the linux side. I did a search for a couple of strings such as project names etc but not hits.

Really, I have to wonder why in the world there would be a check box that wipes out your entire disk drive on shut down? WTF were the VBOX developers thinking?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

There should be an additional question for confirmation if you change something in the snapshot structure (except when adding one).

If you use Google, there are enough hits for you to try. We are not a forum for this kind of subject.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Post by RickJ »

Sasquatch wrote:There should be an additional question for confirmation if you change something in the snapshot structure (except when adding one).
Well there wasn't any confirmation, I just checked the box and hit the ok button to close down the VM. On next start everything gone.
Sasquatch wrote: If you use Google, there are enough hits for you to try. We are not a forum for this kind of subject.
:?: Sorry, Apparently I have mis-interpreted the forum title "Using VirtualBox" to mean that one could discuss problems using VBOX and have an opportunity to ask for help and advice from other users.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

RickJ wrote:
Sasquatch wrote:There should be an additional question for confirmation if you change something in the snapshot structure (except when adding one).
Well there wasn't any confirmation, I just checked the box and hit the ok button to close down the VM. On next start everything gone.
Sasquatch wrote: If you use Google, there are enough hits for you to try. We are not a forum for this kind of subject.
:?: Sorry, Apparently I have mis-interpreted the forum title "Using VirtualBox" to mean that one could discuss problems using VBOX and have an opportunity to ask for help and advice from other users.
This is indeed a forum for asking for help, but asking for the best data recovery program or similar is not part of it. You lost data, that's too bad but not much we can do about it. The problem about the reverting snapshot is something you can discus here. That is a strange matter. What checkbox was it? You can restore ignored boxes using the Help Menu.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Post by RickJ »

This is indeed a forum for asking for help, but asking for the best data recovery program or similar is not part of it.
I came here and asked for help. You replied saying that I could possibly recover my data with "data recovery software". Since the term "data recovery software" is rather vague and a Google Search yields more than 5 million pages, it seemed to me that the most natural thing to do was to ask you to clarify your previous statement.

Instead of tossing me out of the forum you could have simply told me if you were familiar with any such programs that were likely to work or could have given come hints or clues that would aid my search. You could have at least responded to my second question that asks if the recovery would have more chance of success running from the guest os or from the host os. if you didn't know all you had to was to say so.

I see no reason for you to with hold that information from me and the other members of this forum. Not only was your reply non-responsive and impolite, more importantly it may have dissuaded other people from offering their opinions and suggestions.
You lost data, that's too bad but not much we can do about it. The problem about the reverting snapshot is something you can discus here.
It's a moot point now, isn't it. What a darn great feature!
That is a strange matter. What checkbox was it?
1. Right click->close VM on Linux host task bar

2. Close Virtual machine Dialog pops up
o Radio Button - Save machine state
o Radio Button - Send shutdown signal
o Radio Button - Power off machine
[] Revert Snapshot check box

3. Press OK

4. Confirm dialog does appear but language is vague, just repeats checkbox text

5. VM closes

6. Start VM - everything wiped clean

Thanks for all your efforts and for making me feel welcome on this forum. You have been a great help and I just can't say know how impressed I am with the "revert" function in particular and how pleased I am with virtualbox in general.

Best Regards - RickJ
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Rick, in windows you can do a shift-delete on a folder and if you say "yes" its gone. Ditto in Linux, and here you can do a rm -R /* and trash the entire file system if you are root. Driving a car at speed and one twitch can cause death. You need an adequate level of training to do any job. In your case you had inadequate training or familiarity with VBox and made a mistake that a trained person would not make. Confirmation boxes are there to make you think and not to be ignored. I doubt that you will repeat this mistake.

You can't blame VBox because it isn't novice proof. I remember 30 years ago working on an OS where when you deleted multiple files, the system came came up with two prompts: "Are you sure?" "You don't want to keep any of these files?", but this still didn't stop the almost automatic Y<cr>N<cr>Oh shit!!

The fact is that humans make mistakes, software can have bugs, hardware can fail, PCs can be stolen, houses can catch fire. You should always keep this in mind and have continuity plans which balance the costs of such failure against the inconvenience of maintaining them. In short you really need to think about how you back up your work, so that you can have piece of mind.

This is a real issue that can have painful consequences, but in my view it not one for VBox to solve.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Post by RickJ »

I certainly do accept my culpability in this disaster. I ought to know better and should have adequately backed-up my work.

However that doesn't make it a good idea to have a little checkbox on a shutdown dialog that will erase one's entire virtual drive without warning, IMHO. It's the equivalent of having a " rm -R /*" button stuck in between the OK and CANCEL buttons of a save dialog.

The sad thing is that I believe I probably could have resurected some critical data had I been given just a little advice and information at the start. Like for instance you could have told me which files to preserve and what they might contain and/or described a typical VDI recovery strategy.

It's interesting that you have put in so much effort to tell me things that I already know and have expended so little effort in sharing information, you posses, that would have been helpful to my situation.

Just to be clrear, I wasn't expecting a dissertation; I would have been happy with something like "Snapshot files are named *.sav and *.vdi and are located in Snapshots folder. Your lost data may be in one of these files. You may be able to use something like xxxx or yyyyy recovery software to recover data from these files. It's possible to manually extract data from these files using aaaa, hex editor, or similar. Make copies of these files before you do anything. Good luck and let us know how it turns out".

Instead I got slogans like "use data recovery software" , "you may beable to manualy recreate your data", and the jewel of all jewels "... don't ask stuff like that here. Use google it will give you plenty of links.."

Well I think I've spent enough time explaining my point of view. I wish you well and hope you never find yourself ina similar situation.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Rick, with a certain irony this is my second attempt at this reply. On the first, I hit the close app icon instead of the close window on a different window I was cross-checking on. Firefox shut all my windows without double checking :-(

Anyway I've raised a ticket (#2578), to request improvements to the documentation in this area. BTW, the UG is quite specific in section 3.4.4 on the dangers here:
  • Note: The snapshot reverted to will affect the virtual hard drives that are connected to your VM, as the entire state of the virtual hard drive will be reverted as well. This means also that all files that have been created since the snapshot and all other file changes will be lost.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Post by RickJ »

Terry, thanks for listening.

If improvements are being contemplated may I suggest text, similar to the following, appear in a confirmation box. It won't be of much use buried in a a pile of documentation where it may or may not be found. Now if some folks think such a confirmation box is too burdensome then there could be one of those "don't ask me again" check boxes.
Note: The snapshot reverted to will affect the virtual hard drives that are connected to your VM, as the entire state of the virtual hard drive will be reverted as well. This means also that all files that have been created since the snapshot and all other file changes will be lost.


The other thing I would suggest is that a snapshot of the current system be taken automatically when a revert is done in such a way that recovery would be reliable and painless. I suspect something like this is already being done as at one point I did see a {...}.sav file turn up. It disappeared before I had a chance to investigate and of course nobody here gave nme a heads up or made any mention of it.

BTW I still have a {...}.vdi sanpshot file I did manage to save. It has a timestamp close to when this all happened. I didn't request that any snapshots be taken at that time. Is it possible that some of my data is in there? Could you explain what files got changed and how during the revert operation? How can I go about inspecting the snapshot file? Is it possible to inspect it with a hex editor and search for ascii strings that are likely in my data or do I need tio use some other method.

Thanks for all your help.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

RickJ wrote:... may I suggest text ...
Rick, you should give this feedbqack yourself on the ticket. To do this you first need to register for a wiki user account (this is different to a forum account sorry) and then you post oyur own comments to the ticket.
RickJ wrote:The other thing I would suggest is that a snapshot of the current system be taken automatically when a revert is done in such a way that recovery would be reliable and painless.
Sounds like you would prefer the files being moved to the trash can rather than deleted. Again, make the suggestion.
RickJ wrote:BTW I still have a {...}.vdi snapshot file ... Could you explain what files got changed and how during the revert operation?
This is somewhat complex, but described in my tutorial All about VDIs
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
RickJ
Posts: 9
Joined: 5. Nov 2008, 07:10

Post by RickJ »

I have already read your tutorial and hence the questions. I have read it again thoroughly and it makes no mention of {...}.sav files or what they may contain. Neither is there any explanation of the difference between .sav and .dvi or when they are created with respect to a revert operation. Also, I found nothing in your tutorial about searching, extracting or recovering data from either of these file types.

I have also reviewed the ticket you opened. It's for documentation changes and marked trivial. It doesn't seem to be an appropriate place to suggest enhancements to the user interface or changes in functionality. I expect I would either be ignored or sharply rebuked.

So instead I sent my comments directly to Sun.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Rick, the reason that I've gave you the URL of the ticket was so that if you dissented from my explanation then you could add your own viewpoint. The Sun team review these tickets and if they agree with you then they will reclassify the ticket. As to the severity, etc., you need to read the Trac guidelines.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Lx3
Posts: 2
Joined: 20. Sep 2012, 14:47

Re: Help: Recover data lost from revert to snapshot?

Post by Lx3 »

Hello,

This feature is as useless as incongruous, in deed this can be achieved with menu options.
I'm speaking about the data loss checkbox (revert to previous snapshot / obviously checked by default after each new update installtion), it's not really pragmatic, especially for those like me that have big hands and a little netbook's keyboard.
Mistakes are easy to done, and revert/recover operations not possible, I wonder what the team had in mind sun when designing the GUI.
Nevertheless, great job guys, congratulations (And thanks for data losses on mishandling). :mrgreen:


More seriously, I never encountered any problems but this one with this amazing software.

Best regards,
Post Reply