From d980bb45f6f1d571b93d4f4e41e520e0c2d02dff Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Fri, 24 Jan 2025 12:03:16 +0100 Subject: [PATCH] vault backup: 2025-01-24 12:03:16 --- ...Move Docker data directory to new location.md | 16 ++-------------- Prozesse Infrastruktur - OS Migration.md | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Docker - Move Docker data directory to new location.md b/Docker - Move Docker data directory to new location.md index 7b342d86..076f55d7 100644 --- a/Docker - Move Docker data directory to new location.md +++ b/Docker - Move Docker data directory to new location.md @@ -28,16 +28,10 @@ And set the data root: } ``` -Copy the current docker directory to the new directory. +Move the current docker directory to the new directory. ```bash -rsync -aP /var/lib/docker/ /mnt/sdb/docker -``` - -Rename the old directory. - -```bash -sudo mv /var/lib/docker /var/lib/docker.old +sudo mv /var/lib/docker /mnt/sdb/docker ``` Restart the Docker deamon. @@ -52,9 +46,3 @@ Test if all services work as expected. docker ps -a docker info -f '{{ .DockerRootDir}}' ``` - -If everything is good, remove the old Docker directory. - -```bash -sudo rm -rf /var/lib/docker.old -``` \ No newline at end of file diff --git a/Prozesse Infrastruktur - OS Migration.md b/Prozesse Infrastruktur - OS Migration.md index eca004a9..7e9f7c98 100644 --- a/Prozesse Infrastruktur - OS Migration.md +++ b/Prozesse Infrastruktur - OS Migration.md @@ -14,7 +14,7 @@ responsible: Janik von Rotz docker_data_dir: /mnt/sdb/docker fstab_mounts: - path: /mnt/sdb - src: /dev/disk/by-id/$DISK_ID + src: /dev/vdb opts: discard,nofail,defaults state: mounted fstype: ext4