From f059fb76f9a5e8c27cb8ca22a352f4760e1950e8 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Mon, 20 May 2019 19:47:26 +0200 Subject: [PATCH] Up --- gx-backup-erp => scripts/backup-erp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename gx-backup-erp => scripts/backup-erp (59%) diff --git a/gx-backup-erp b/scripts/backup-erp similarity index 59% rename from gx-backup-erp rename to scripts/backup-erp index 0486875..ba57bf9 100755 --- a/gx-backup-erp +++ b/scripts/backup-erp @@ -2,19 +2,20 @@ set -x +ERP_HOST="example.com" DATE="$(date --iso-8601)" DISPLAY=:0 BACKUP_DIR="$HOME/Documents/Backup" echo "Exporting database dump" -/usr/bin/setsid ssh apps.glenux.net \ +/usr/bin/setsid ssh "$ERP_HOST" \ dokku mariadb:export erp \ - > "$BACKUP_DIR/net.glenux.apps.erp.$DATE.sql" + > "$BACKUP_DIR/$ERP_HOST.$DATE.sql" echo "Exporting files" -/usr/bin/setsid ssh apps.glenux.net \ +/usr/bin/setsid ssh "$ERP_HOST" \ docker exec erp.web.1 \ "bash -c 'cd /var/www/html/documents ; tar czf - .'" \ - > "$BACKUP_DIR/net.glenux.apps.erp.$DATE.tar.gz" + > "$BACKUP_DIR/$ERP_HOST.$DATE.tar.gz"