docker instead of nerdctl and minor changes

This commit is contained in:
julien
2025-10-07 13:20:09 +02:00
parent 338655642a
commit 0b5644d59e
5 changed files with 14 additions and 17 deletions

26
scripts/vol-restore Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
#
# Run this script as root inside a service directory.
# The backup have to be in the same directory.
#
# Extract the archive into volumes directory
BACKUP=${PWD##*/}.tar.zst
if [ -d "volumes" ]; then
rm -r volumes
fi
mkdir volumes
tar --zstd --same-owner -xvf $BACKUP -C volumes
# Start the service and populate db from sql file if needed
if [ -f "compose.db-restore.yml" ]
then
docker compose -f compose.yml -f compose.db-restore.yml up -d
else
docker compose up -d
fi
# Clean backup files
rm $BACKUP
rm volumes/*.sql