feat: docker volume export

This commit is contained in:
2026-06-17 12:52:42 +02:00
parent 59f6f34566
commit 07813d1d5d
2 changed files with 40 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
if [[ $1 ]]; then
volume_name=$(echo $1)
else
echo "Volume name not specified, exiting"
exit 1
fi
save_path=$([[ $2 ]] && echo $2 || echo "./export")
docker run --rm \
-v $volume_name:/data \
-v $save_path:/backup \
archlinux \
bash -c "tar -xf /backup/export.tar.gz -C /data && ls /data"