Skip to content

Commit e7b27f1

Browse files
authored
Merge pull request #23060 from aevesdocker/ENGDOCS-2708
Desktop:backups
1 parent da0e0b6 commit e7b27f1

File tree

1 file changed

+67
-3
lines changed

1 file changed

+67
-3
lines changed

content/manuals/desktop/settings-and-maintenance/backup-and-restore.md

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ aliases:
88
- /desktop/backup-and-restore/
99
---
1010

11-
Use this procedure to back up and restore your images and container data. This is useful if you want to reset your VM disk or to move your Docker environment to a new computer.
11+
Use this procedure to back up and restore your images and container data. This is useful if you want to reset your VM disk or to move your Docker environment to a new computer, or recover from a failed Docker Desktop update or installation.
1212

1313
> [!IMPORTANT]
1414
>
1515
> If you use volumes or bind-mounts to store your container data, backing up your containers may not be needed, but make sure to remember the options that were used when creating the container or use a [Docker Compose file](/reference/compose-file/_index.md) if you want to re-create your containers with the same configuration after re-installation.
1616
17-
## Save your data
17+
## If Docker Desktop is functioning normally
18+
19+
### Save your data
1820

1921
1. Commit your containers to an image with [`docker container commit`](/reference/cli/docker/container/commit.md).
2022

@@ -39,7 +41,7 @@ Use this procedure to back up and restore your images and container data. This i
3941
After backing up your data, you can uninstall the current version of Docker Desktop
4042
and [install a different version](/manuals/desktop/release-notes.md) or reset Docker Desktop to factory defaults.
4143

42-
## Restore your data
44+
### Restore your data
4345

4446
1. Load your images.
4547

@@ -59,3 +61,65 @@ and [install a different version](/manuals/desktop/release-notes.md) or reset Do
5961
or [Docker Compose](/manuals/compose/_index.md).
6062

6163
To restore volume data, refer to [backup, restore, or migrate data volumes](/manuals/engine/storage/volumes.md#back-up-restore-or-migrate-data-volumes).
64+
65+
## If Docker Desktop fails to start
66+
67+
If Docker Desktop cannot launch and must be reinstalled, you can back up its VM disk and image data directly from disk. Docker Desktop must be fully stopped before backing up these files.
68+
69+
{{< tabs >}}
70+
{{< tab name="Windows" >}}
71+
72+
1. Back up Docker containers/images.
73+
74+
Backup the following file:
75+
76+
```console
77+
%LOCALAPPDATA%\Docker\wsl\data\docker_data.vhdx
78+
```
79+
80+
Copy it to a safe location.
81+
82+
1. Back up WSL distributions.
83+
84+
If you're running any WSL Linux distributions (Ubuntu, Alpine, etc.), back them up using [Microsoft's guide](https://learn.microsoft.com/en-us/windows/wsl/faq#how-can-i-back-up-my-wsl-distributions-).
85+
86+
1. Restore.
87+
88+
After reinstalling Docker Desktop, restore the `docker_data.vhdx` to the same location and re-import your WSL distributions if needed.
89+
90+
{{< /tab >}}
91+
{{< tab name="Mac" >}}
92+
93+
1. Back up Docker containers/images.
94+
95+
Backup the following file:
96+
97+
```console
98+
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
99+
```
100+
101+
Copy it to a safe location.
102+
103+
1. Restore.
104+
105+
After reinstalling Docker Desktop, restore the `Docker.raw` to the same location.
106+
107+
{{< /tab >}}
108+
{{< tab name="Linux" >}}
109+
110+
1. Back up Docker containers/images:
111+
112+
Backup the following file:
113+
114+
```console
115+
~/.docker/desktop/vms/0/data/Docker.raw
116+
```
117+
118+
Copy it to a safe location.
119+
120+
1. Restore.
121+
122+
After reinstalling Docker Desktop, restore the `Docker.raw` to the same location.
123+
124+
{{< /tab >}}
125+
{{< /tabs >}}

0 commit comments

Comments
 (0)