When you need to back up, restore, or migrate data from one Docker host to another, volumes are generally the best choice. Normally, if you want to back up a data volume, you run a new container using the volume you want to back up, then execute the tar command to produce an archive of the volume content: docker run --rm \ -v "$VOLUME_NAME":/backup-volume \ -v "$(pwd)":/backup \ busybox \ tar -zcvf /backup/my-backup.tar.gz /backup-volume

You can now back up volumes with just a few clicks using the new Volumes Backup & Share extension.

How to back up a volume to a local file in your host

A registry: pushes a local volume to any image registry, whether local (such as localhost:5000) or hosted like Docker Hub or GitHub Container Registry.

Related Articles