-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost data after a docker upgrade #14461
Comments
Okey, so... I don't understand anything... but it seems I may access the data now (at least it seems so). BackupNow that I made a backup of Trying direct access to the virtual disk files: FAILFirst, I used Mount-VHD and Dismount-VHD to test if I could access the data directly. More info here:
So the steps are:
This is what happened: In PowerShell as Administrator:
Then in wsl, as root, it got set as /dev/sdd
It could not mount anything. So I unmounted it from Windows: In PowerShell as Administrator:
Instead, if I try with ...wsl\main\ext4.vhdx instead of ...wsl\disk\docker_data.vhdx I could see the contents of it within the WSL. Conclusions so far:
Docker Desktop again. Will it work?So at this moment I thought "okey, all lost"... what will I loose if I restart Docker Desktop again? And... boummm... the images and the volumes and the containers (nearly*) all were back again. I swear I saw it empty this morning! I did!! What?!? So... this arises me a question... where is my data (the one that I am currently seeing in the docker desktop) physically located? If there's no docker-desktop-data distro now, where's my real data? I know, I know... I should backup the volumes "from the docker itself"... it's only just curiosity to understand what Confidence stateWhen something fails and then suddently works, one feels like "hummm... why? and will it fail again?" For example, I am scared to reboot again. Will I loose it again after a reboot? Why it did not appear this morning if the data is there tonight? What's the reason? Will it happen again? Why I say "nearly*" beforeThe volumes are there and the containers having volumes mounted stated well. Instead, all the containers having "bind mounts" to the real filesystem are stuck. A few examples: All of them were running with normality yesterday, I just picked a few: Some running yesterday and that tonight run: appsmith, grist-prod, grist-test, mercuer, socks5, mysql-prod-5.7 or wordpress-multisite. Some running yesterday that today do not start: devel-sf7, kibana, elasticsearch, followup-devel, devel-sf4, devel-php72 There's a common thing between the ones that fail... they have filesystem-bound mount points. For example I try to start devel-sf7 and it says:
IDK if this is related to all the upgrade process and so on. So... questions
Thanks in advance! |
Okey... I'm getting crazy... Checked again the "Start docker when starting windows" Rebooted... and.... you know what? Lost again!! I start thinking that:
Then I click on the systray icon to stop it (lasted like 3 mins at stopping "nothing") and then opened it again from the start menu... and... you know what??? they are back again!!! Also showing v4.36. Partial conclusionSo it seems not that the installer "deleted the data files" but that for some reason the new version "sometimes get the data files, sometimes does not". I'll be more than happy to help debug what's going on. Let me know instructions. |
@xmontero Thanks for the detailed explanation and for furthering the investigation. Really interesting finds. Some answers to your questions:
Your data is in
You can check the content of your virtual disk by manually mounting the disk in a WSL distribution, much like you did in your exploration above. For example
You'll see there's a Rember to Now, moving to the real question on why you don't see the data after a windows reboot. I'd ask you to try the following steps if you are happy to help debug. Please, make sure to have a backup copy of Check the Docker Desktop version running when containers are present and when they are notI'd expect them to be the same, but let's make sure of it. You can check the exact version (also known as build number) by clicking on Ensure you are running the WSL2 backend in both cases.The other backends (Hyper-V and Windows Containers) use a different storage drive, so that could explain why you don't see the data.
Gather diagnostics immediately after startingI'd kindly ask you to gather two more diagnostics. One immediately after starting Docker Desktop when the containers are missing. One more immediately after starting Docker Desktop when the containers are present. This will help me compare the logs and possibly spot the differences. You can gather the diagnostics from Docker Desktop by clicking on the question mark icon on the top of the dashboard ("Troubleshoot") and then Try restarting the engineAfter staring DOcker Desktop with missing containers, could you try to hit "Restart" in the three dots menu on the bottom-left, next to the green "Engine running" label? Does that bring the containers back? Manually explore the content of the
|
Hi @andrea-reale thanks for your guiding. I will try all of that and report accordingly. Nevertheless, I run a travel agency and I need to recover the lost time from yesterday and today and I need to pass quotations to clients, sort out travel documents, and all those kind of things. I am writing to make you know that I received your guidance and I'll do ASAP but not probably today or tomorrow. If I don't sell trips, I dont eat :) you know!! Just ACK all received and in the queue to be processed! |
Description
This issue is closely related to #14453 although it derived to a different nature, this is why I'm spinning-off it from there.
After upgrading the Docker Desktop as a response to the normal prompt of "there's a new version", I (apparently) lost all of my data during the process of upgrade. There's a point in time today at which I don't see any images, containers, networks or volumes.
The context
Running on Win11, with an underlying WSL2 layer. This configuration has worked perfectly during multiple years.
WSL Distro disappearing
As a context too, the current version pre-upgrading was 4.35 but I installed docker desktop so much time ago that in the past, I usually had 2 WSL distributions:
docker-desktop
anddocker-desktop-data
that were usually listed when I didwsl -l
.As of now, I don't see
docker-desktop-data
anymore. But I can't tell for certain if it "disappeared today" with the issue, or Docker Desktop already managed to "merge" to the new format that was changed at 4.30 at some previous moment. I'm not completely sure of when it happened the "distro vanishing".What I can tell is that until yesterday night I usually had a approximately a dozen of containers permamently running in my laptop all working perfect and with zero issues. Some of the with named volumes, and some networks connecting them together. As for the images I had both downloaded images plus images built by me.
All this was present yesterday and I was working with it normally.
So all this data either was present in the
docker-desktop-data
WSL distro or was previously merged but it was there, perfectly up and running.What happened today
I copy this sequence here again, for simplicity to the reader but it was originally posted here #14453 (comment)
Keypoints: step 5 => I see the data, step 8 => I don't see the data.
As a side-note, I double-checked: No listings on the GUI, and empty results in CLI with
docker ps -a
ordocker image ls
ordocker volume ls
. Nothing at all.Additional info: After I saw there's no data, I unchecked the box "start when windows starts" and closed Docker desktop to avoid any possible extra damage. So I've not tried "re-launching" it again and again to avoid possible "rewriting" or "re-deletion" and whatnot.
Maybe I just re-launch it and the data appears again... but I wanted to make some backing-up before going that way.
Virtual disk existence?
After that I checked if the
docker_data.vhdx
existed - comment here: #14453 (comment)This file is 160 GB in size, so I expect it's "my data", not an "empty data virtual disk of that size" but I've not really checked the content yet (see below) at section [x]
Diagnostics
As requested, I sent the logs here #14453 (comment)
Diagnostics ID: BB5FCCBA-A57A-422E-A449-A09F8402C9FD/20241202115602 (uploaded)
Backups [x]
After feeling to loose the data, I was affraid of starting Docker Desktop more times. I felt it could potentially destroy things. So I did not want to start it again "just to try" to avoid potential destruction, at least until making some backups.
Once the
docker_data.vhdx
has been located, and seen its 160 GB big, I just made a binary backup of the virtulal disk to another computer and did a sha1sum to check I have a "good backup".What am I going to do now? Now I'm going to try to discover if I may "mount" Read-Only the
vhdx
somehow to see the contents and check if my data is in it or not.vhdx
maybe it's time to start Docker Desktop again to see what happens (now that I have a copy of the disk)Please help!
Reproduce
See description
Expected behavior
Install the "dev build" and, after a reboot, continue seeing my containers, volumes, etc.
docker version
docker info
Diagnostics ID
BB5FCCBA-A57A-422E-A449-A09F8402C9FD/20241202115602
Additional Info
No response
The text was updated successfully, but these errors were encountered: