Added create backup to yams
This commit is contained in:
parent
4e11e0e868
commit
88707c12c9
@ -139,6 +139,7 @@ sed -i -e "s;<install_location>;$install_location;g" $filename
|
|||||||
|
|
||||||
# Set yams script
|
# Set yams script
|
||||||
sed -i -e "s;<filename>;$filename;g" yams
|
sed -i -e "s;<filename>;$filename;g" yams
|
||||||
|
sed -i -e "s;<install_location>;$install_location;g" yams
|
||||||
|
|
||||||
|
|
||||||
send_success_message "Everything installed correctly! 🎉"
|
send_success_message "Everything installed correctly! 🎉"
|
||||||
|
5
yams
5
yams
@ -2,6 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
dc="docker-compose -f <filename>"
|
dc="docker-compose -f <filename>"
|
||||||
|
install_location="<install_location>"
|
||||||
|
|
||||||
option=${1:-"--help"}
|
option=${1:-"--help"}
|
||||||
|
|
||||||
@ -50,3 +51,7 @@ if [ $option == "destroy" ]; then
|
|||||||
echo "\$ yams start"
|
echo "\$ yams start"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $option == "create-backup" ]; then
|
||||||
|
tar -czf "$install_location/backups/yams-backup-$(date '+\%Y-\%m-\%d-\%s').tar.gz" $install_location/config/*
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user