Current Data lost, everything back to last snapshot?

Discussions related to using VirtualBox on Windows hosts.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Current Data lost, everything back to last snapshot?

Post by MTSE »

First of all, please excuse my weak technical background in Virtualbox. I am using it for running owncloud, which I get step by step instruction on implementing it on VirtualBox.
So, here is the story:
. I get Out of Space error and I was trying to add some space to my virtual disk.
. I was playing around with it a bit and try to add and delete those attached disks
. Try to delete the only one snapshot I made 3 years ago but failed as I do not have enough space.
. Eventually, I managed to increase the space beyond 2TB. My physical HDD is 3TB.
. I can start the VirtualBox again but I notice the content in there was back to my snapshot 3 years ago.
. I look at the data files and seem like the virtual Disk are still there. The 1.5T I think waas what I had before the snapshot, then the 30G or so might be what I am missing in the past 3 years?

Is there a way for me to include some screen dumps in here? When I try to upload, it says he max size is 128kb?

I include a Onedrive link here to see the screen dumps. 1drv.ms/f/s!AmtbfLfhQBKxg58PpcSDIVw-3yJgng

Many thanks!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Current Data lost, everything back to last snapshot?

Post by mpack »

The only thing I can suggest is that you try cloning the snapshot (NOT THE BASE VDI AS THAT WILL GIVE YOU THREE YEAR OLD DATA AGAIN) using CloneVDI. If it works it will create a merged, flattened VDI containing latest data that you can build a new VM around. The latter will also change all the UUIDs which may kill software and OS activation - but since you posted in "Windows Hosts" and give no info about the guest OS I won't go over those solving those issues until we know it's a problem.

CloneVDI will allow you to create a clone on a secondary drive, so space should not be an issue. If you get the "CloneVDI does not support differencing disks" error, then move all the snapshots into the same folder as the base VDI and try cloning the SNAPSHOT again there. You can also move them back again later.

It is a concern that you already tried and failed to delete the snapshot. To my knowledge that is normally fatal. In fact keeping snapshots around at all is eventually fatal.

And I guess it would be stupid to address the elephant in the room - how old is your most recent backup?
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

Thanks for your reply mpack. I am not familar with how those virtual disk and snapshot works. It might sounds silly but I need more detail instructions to do anything. It is running on univention.
Can you or do you know of anyone happy to remote desktop to my computer and have a look for me (even with a fees). I have not got backup, the current data was 2020. I really hope the problem is not that big.
I did delete an "attached drive" as it shows the actualy size is only 1MB. Other than that, I should not have done too much damage, I hope!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Current Data lost, everything back to last snapshot?

Post by mpack »

Just look in the VM folder. The largest file there is the VDI, called <same name as VM>.VDI (caveat, on windows you must enable display of all file extensions otherwise you will get very confused).

You will also see a subfolder called "Snapshots". If you enter that subfolder you will see one or more snapshot VDIs. Snapshot VDIs are overlaid on top of the base VDI in order to get later versions of the disk contents. IF THERE IS MORE THAN ONE SNAPSHOT VDI THEN YOU NEED TO IDENTIFY THE MOST RECENT ONE.

Follow the CloneVDI link I gave you above, download and run it. It should be simple enough to understand. Identify the snapshot VDI file you want to clone (i.e. the latest one), and identify where you want the clone written to. Check the "Keep UUID" box and click "Proceed".

And sorry, this is a hobby and I want to keep it that way. I do not do personal support.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

Much appreciated mpack. I will give it a try and let you know.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

The VDI in the VM folder is 800G, I will leave that as is.
Within the Snapshot directory, there are a few VDI, but i have only got one snapshot. Anyway, one of the largest one is 1.5T and I am running CloneVDI on it now. I think it will take quite a few hours. Will keep you posted. Thanks again, hope all these will work out
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Current Data lost, everything back to last snapshot?

Post by mpack »

If you also click the "Compact" checkbox in CloneVDI then it will minimize the size of the clone (and therefore the duration of the copy), i.e. by skipping sectors belonging to deleted files.

It would also help to use a good quality external drive, e.g. SSD. USB flash drives are not designed for continuous writes, they will often overheat and fail.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

That is great, the Compact function reduces the time and size to 400MB now. Now, the question is, how can I apply this clone VDI file back to Virtual Box?
When I look into Storage of the VM, it describes "This base hrddisk is indirectly attached using the following differencing hard disk: W:\..... " it is only showing one snapshot which is the one I took after the "storage full" problem. It does not seem to show the one I took back in 2020.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

I really have no luck. I tried to "add" the cloned snapshot file to the VM but I do not seem to be able to "see" the content. May I ask how to do this?

" If it works it will create a merged, flattened VDI containing latest data that you can build a new VM around"

Sorry to ask the obvious, I am really not familiar with it. I have tried to read up how virtual box works but am still learning.

Thanks.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Current Data lost, everything back to last snapshot?

Post by mpack »

You don't add the clone back into the original VM - that VM is dead, the point is to recover as much as possible of the the data not revive the dead VM.

Just create a new VM, making the settings as close as possible to what the old VM had. When you get to the drive creation step I would choose the "Do not add a virtual hard disk" option. Then as soon as the VM is created, right click it, choose "Show in Explorer", and move the VDI into the folder you are taken to. In the VM Settings|Storage area click the second "+" (Add hard disk) icon on the primary disk controller, and browse to your VDI which by now is inside the VM folder. Once done the VM should be ready to boot.

At least some of your questions are answered by the readme.txt that comes with CloneVDI. This is also available as a PDF in the root post of the CloneVDI topic.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

Thanks for that Don. I just had a good read on the CloneVDI Release Note.txt and understand a lot more about how those snapshots work now.

I will create a new VM as you suggested and see how it goes from there. Again, thank you for your direction and I feel I am one step ahead every time.

To complicate the problem is that the VM is in Linux and I am not familar with that too. Anyhow, will give it a try :D
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Current Data lost, everything back to last snapshot?

Post by mpack »

I should mention that the cloned VDI is stand alone and should now contain all of your latest data. There are tools which can inspect the contents of a VDI disk image and allow you to retrieve files, independently of getting a new VM to boot. For example 7-zip and PowerISO both claim to be able to inspect VDI files, but I don't know if they support Linux filesystems when the host is Windows.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

Regret to report that the Cloned VDI file is significantly smaller than what I had in there. I suppose it may have to do with the fact that I asked VB to "remove" the VDI file before. So, somehow the link was lost (it did warn me for that). Although I recovered the "deleted" VDI file, I suppose VB will not let me hook it back in as the link was deleted.
I used to have about 2T of files in there and now the cloned VDI only show 250MB.

I am trying to use 7-zip to see the content and hopefully will get something.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Current Data lost, everything back to last snapshot?

Post by mpack »

The whole point of compaction is that the output is significantly smaller than the input. I'd be very surprised if CloneVDI saw a corrupted drive and didn't complain about it.
MTSE
Posts: 12
Joined: 20. Jan 2023, 07:34

Re: Current Data lost, everything back to last snapshot?

Post by MTSE »

Sorry, I didn't explain well enough. I dont think the problem is CloneVID, it is doing what it supposed to do but there is no link to my deleted VDI and therefore it cannot find it. Unless, there's is a way to tell VB what snapshot to link to my base VDI, I don't think CloneVID can help.
Do I understand correctly, or I missed something.
Post Reply