srv-scripts/bin/vol-restore.sh

17 lines
303 B
Bash
Raw Normal View History

2025-01-19 16:51:01 +01:00
#!/bin/bash
#
# Run this script as root inside a service directory.
# The backup have to be in the same directory.
#
BACKUP=${PWD##*/}.tar.zst
if [ -d "volumes" ]; then
rm -r volumes
fi
mkdir volumes
tar --zstd --same-owner -xvf $BACKUP -C volumes
# Todo :
# Import .sql if there
# rm volumes/*.sql