Add backup scripts
This commit is contained in:
parent
7da2098ac0
commit
be564cfb95
3 changed files with 219 additions and 0 deletions
17
restore.sh
Executable file
17
restore.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue