From 14771ab147bef32fda9efcc8234e76acaba0f1b1 Mon Sep 17 00:00:00 2001 From: Matt McKinnon Date: Mon, 26 Sep 2016 22:53:01 +1000 Subject: [PATCH] Updated sentora_www-backup.sh - creates single tar.gz file of websites --- sentora_www-backup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sentora_www-backup.sh b/sentora_www-backup.sh index 7831122..7642951 100755 --- a/sentora_www-backup.sh +++ b/sentora_www-backup.sh @@ -7,8 +7,10 @@ # Backup your public_html folder under /var/sentora/hostdata/DOMAIN_NAME/public_html -#find domains +WEBPATH=$(find /var/sentora/hostdata/* -maxdepth 0 -type d | awk -F/ '{print $5}') -find /var/sentora/hostdata/* -maxdepth 0 -type d | awk -F/ '{print $5}' +for SITES in $WEBPATH; do + tar -zcvf /BACKUP/www/$SITES.tar.gz /var/sentora/hostdata/$SITES +done