From d065c3d7a57e0e93965e4ee467cc4c8b67ff3107 Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Mon, 8 Jul 2024 18:40:03 +0200 Subject: [PATCH] vault backup: 2024-07-08 18:40:03 --- Docker - Move Docker data directory to new location.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Docker - Move Docker data directory to new location.md b/Docker - Move Docker data directory to new location.md index ccb587dc..037efd27 100644 --- a/Docker - Move Docker data directory to new location.md +++ b/Docker - Move Docker data directory to new location.md @@ -18,14 +18,14 @@ Create a config file **/etc/docker/daemon.json** ```json { - "data-root": "/mnt/server-disk2/docker" + "data-root": "/mnt/sdb/docker" } ``` Copy the current directory to the new directory. ```bash -sudo cp -rp /var/lib/docker /mnt/server-disk2/docker +sudo cp -rp /var/lib/docker /mnt/sdb/docker ``` Rename the old directory. @@ -42,6 +42,10 @@ sudo service docker start Test if all services work as expected. +```bash +docker ps -a +``` + If everything is good, remove the old Docker directory. ```bash