555 B
555 B
- Stop existing deployment
- Create a dedicated named docker volume with
docker volume create target-vol
- Copy existing contents
# copy
docker run -d --rm --name temp -v target-vol:/mnt alpine tail -f /dev/null
docker cp /opt/.../. temp:/mnt
# once finished
docker stop $MIGRATOR_NAME
- Adapt existing deployment
# dedicated volumes section
volumes:
target-vol:
external: true
# change any mount paths
volumes:
- target-vol:/....
- Adapt any backup scripts which would point to the old data host directory