Transfer Docker Volumes with DAT
If you have a Docker Volume on one server, and you'd like to get it onto another you can use the following guide:
I have published a Docker image allowing a user to share a volume over DAT.
docker run -it --rm -v {volume}:/backup -p 3282:3282 moritonal/dat-create-backup
-it
allows you to start and stop it--rm
deletes the container after your're finished-v {volume}:/backup
maps the target volume to the/backup
dir in the container-p 3282:3282
maps the port so DAT can receive communicationsmoritonal/dat-create-backup
is the image name
When ran this will output a DAT url (yes, in tricky-to-see dark-blue) and start syncing it. You can then pass this into the next Docker image, which allows a user to pull a DAT into a Docker Volume.
docker run -it --rm -v {volume}:/backup moritonal/dat-pull-backup dat://{dat}
-it
lets you watch the progress--rm
delete image after you're finished-v {volume}:/backup
maps the volume to/backup
moritonal/dat-pull-backup
is the image namedat://{dat}
is the name of the DAT outputted by the counterpartdat-create-backup
command
I also apologise for the massively too fat images, I should really slim them down at some point.