You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/desktop/settings-and-maintenance/backup-and-restore.md
+67-3Lines changed: 67 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,15 @@ aliases:
8
8
- /desktop/backup-and-restore/
9
9
---
10
10
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.
12
12
13
13
> [!IMPORTANT]
14
14
>
15
15
> 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.
16
16
17
-
## Save your data
17
+
## If Docker Desktop is functioning normally
18
+
19
+
### Save your data
18
20
19
21
1. Commit your containers to an image with [`docker container commit`](/reference/cli/docker/container/commit.md).
20
22
@@ -39,7 +41,7 @@ Use this procedure to back up and restore your images and container data. This i
39
41
After backing up your data, you can uninstall the current version of Docker Desktop
40
42
and [install a different version](/manuals/desktop/release-notes.md) or reset Docker Desktop to factory defaults.
41
43
42
-
## Restore your data
44
+
###Restore your data
43
45
44
46
1. Load your images.
45
47
@@ -59,3 +61,65 @@ and [install a different version](/manuals/desktop/release-notes.md) or reset Do
59
61
or [Docker Compose](/manuals/compose/_index.md).
60
62
61
63
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.
0 commit comments