Docker Community Forums

Share and learn in the Docker community.

Migrate data volumes on physical disk

(Macdjord) #1

Some of the data volumes on my docker host have started to get very large and are threatening to fill up all my disk space. I have a larger auxiliary drive mounted on this machine, and I want to migrate the locations on physical disk where the volumes are stored onto there.

  • What is the procedure for migrating a data volume?
  • Is there any way to migrate only some of the volumes, so that the large ones can go on the external while the smaller one stay on the faster main drive?

(Nathan Le Claire) #2

You could consider making a new docker volume that is bind mounted to your large drive and have a utility container with access to both volumes copy the files from the old volume to the new, then delete the old volume. Do this for the ones you want to move and leave the others in place.