Add backup scripts

This commit is contained in:
Jurius 2024-03-10 01:16:00 +00:00
parent 7da2098ac0
commit be564cfb95
3 changed files with 219 additions and 0 deletions

17
restore.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
_date="$1"
if [ -z "$_date" ]
then
echo "Error: no date given."
exit 1
fi
compose_project="mailuwuemail"
compose_volumes=( "mail_data" "mail_state" "roundcube_sqlite" )
for volume in "${compose_volumes[@]}"
do
volume_name="${compose_project}_${volume}"
./vackup import "backup_${_date}.${volume_name}.tar.gz" "${volume_name}"
done