Use a temporary container to backup data from a Docker volume to a local tar file
docker run --rm \
-v <volume>:/data -v $(pwd):/backup \
ubuntu tar cvf /backup/backup.tar /data-
the
--rmswitch will clean up the container when the command completes -
replace
<volume>with the Docker volume name -
replace
ubuntuwith another distribution if you want
Example
docker run --rm \
-v paperless_media:/data -v $(pwd):/backup \
ubuntu tar cvf /backup/backup.tar /dataRestore the backup by following: Restore a Docker volume from a local tar file