From 88707c12c91a164bb4fd6e09ece430a2b1c64b39 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Tue, 10 Jan 2023 09:05:16 -0300 Subject: Added create backup to yams --- yams | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'yams') diff --git a/yams b/yams index 94ae558..1f109f7 100755 --- a/yams +++ b/yams @@ -2,6 +2,7 @@ set -eu dc="docker-compose -f " +install_location="" option=${1:-"--help"} @@ -50,3 +51,7 @@ if [ $option == "destroy" ]; then echo "\$ yams start" 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 -- cgit v1.2.3