diff --git a/defaults.inc b/defaults.inc index b9fc9b2c..14909a08 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='4.6.40-05132023' +VERS='4.6.45-05132023' # NODETYPES=LB NODETYPES=MYSQL,LB,WEB,NC,WPD,LPD,MM,PW @@ -204,10 +204,15 @@ REPL_DESC['nextcloud-php']='Nextcloud PHP Settings' declare -A BACKUP_ITEMS BACKUP_ITEMS[nginx-settings]=/etc/nginx -BACKUP_ITEMS[letsencrypt-certs]=/etc/letsencrypt -BACKUP_ITEMS[gitea]=/var/lib/gitea BACKUP_ITEMS[nginx-logs]=/var/logs/nginx -#BACKUP_ITEMS[webserver-files]=/var/www +BACKUP_ITEMS[letsencrypt-certs]=/etc/letsencrypt +BACKUP_ITEMS[webserver-files]=/var/www +BACKUP_ITEMS[haproxy]=/etc/haproxy +BACKUP_ITEMS[keepalived]=/etc/keepalived +BACKUP_ITEMS[fail2ban]=/etc/fail2ban +# BACKUP_ITEMS[nginx]=/ + + GET-CHECKCERT-DOMAINS(){ declare -A CHECKCERT_DOMAINS diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 1e7d5fa2..55031f5d 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -113,16 +113,13 @@ BACKUP(){ mkdir -p ${BACKUP_FOLDER} fi for item in "${!BACKUP_ITEMS[@]}"; do + c=0; cw=14; spc=''; spc1=${cw}-${#BACKUP_ITEMS[$item]}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -en "Backing up '${item}'${spc}" if [ -d ${BACKUP_ITEMS[$item]} ]; then - # [ "${action}" != "backup" ] && - echo -en "Backing up '${item}'... " - #tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -C ${BACKUP_ITEMS[$item]} . tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -C ${BACKUP_ITEMS[$item]} . --exclude='./data/repository' --exclude='*/.stfolder' --exclude='*/.stversions' --exclude='*/.git' >/dev/null 2>&1 - # [ "${action}" != "backup" ] && - echo -e "${idsCL[Green]}Ok${idsCL[Default]}" + echo -e "${idsCL[Green]}Done${idsCL[Default]}" else - # [ "${action}" != "backup" ] && - echo -e "Not backing up '${item}', not found." + echo -e "${idsCL[Yellow]}Not found${idsCL[Default]}" fi done touch ${FOLDER}/backup.lastrun @@ -1307,7 +1304,7 @@ GUI(){ echo -e "Commands followed by '-h' will show addtional info. {work-in-progress}" echo echo -e "Usage: ${idsCL[LightCyan]}nodemgmt ${idsCL[Yellow]}{COMMAND}${idsCL[Default]} {" - echo -e " ${idsCL[Yellow]}backup${idsCL[Default]} - Run backup" + echo -e " ${idsCL[Yellow]}backup${idsCL[Default]} - Run backup of node items" echo -e " ${idsCL[Yellow]}certrenew${idsCL[Default]} - Renew all SSL Certificates" echo -e " ${idsCL[Yellow]}checkcerts${idsCL[Default]} - Check SSL Expirations" echo -e " ${idsCL[Yellow]}delsite${idsCL[Default]} - Delete entire site"