wrapper backup script

This commit is contained in:
julien
2025-01-19 16:51:01 +01:00
parent 122549f077
commit 907cf4215b
6 changed files with 68 additions and 56 deletions

17
sbin/vol-restore Executable file
View File

@@ -0,0 +1,17 @@
#!/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