diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 0b56bd7c..bcf8573e 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -105,29 +105,31 @@ BACKUP(){ BACKUP_FOLDER=/opt/idssys/backups/node-backup #BACKUP_FOLDER=/opt/idssys/backups/node-backups/${NODE_HOSTNAME} #/`date +%Y-%m-%d` #BACKUP_TIMEFOLDER=${BACKUP_DAYFOLDER}/`date +%H-%M` - if [ "${action}" != "backup" ]; then + # if [ "${action}" != "backup" ]; then echo -e "${idsCL[Green]}Backing up Node Settings and Files...${idsCL[Default]}" DIVIDER true - fi + # fi if [ ! -d ${BACKUP_FOLDER} ]; then mkdir -p ${BACKUP_FOLDER} fi - for item in "${!BACKUP_ITEMS[@]}" - do - if [ "${action}" != "backup" ]; then + for item in "${!BACKUP_ITEMS[@]}"; do + if [ -d ${BACKUP_ITEMS[$item]} ]; then + # [ "${action}" != "backup" ] && echo -en "Backing up '${item}'... " - fi - #tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -C ${BACKUP_ITEMS[$item]} . - tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -g ${BACKUP_FOLDER}/backup.snar -C ${BACKUP_ITEMS[$item]} . --exclude='./data/repository' --exclude='*/.stfolder' --exclude='*/.stversions' --exclude='*/.git' - if [ "${action}" != "backup" ]; then + #tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -C ${BACKUP_ITEMS[$item]} . + tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -g ${BACKUP_FOLDER}/backup.snar -C ${BACKUP_ITEMS[$item]} . --exclude='./data/repository' --exclude='*/.stfolder' --exclude='*/.stversions' --exclude='*/.git' + # [ "${action}" != "backup" ] && echo -e "${idsCL[Green]}Ok${idsCL[Default]}" + else + # [ "${action}" != "backup" ] && + echo -e "Not backing up '${item}', not found." fi done touch ${FOLDER}/backup.lastrun - if [ "${action}" != "backup" ]; then + # if [ "${action}" != "backup" ]; then echo "" DIVIDER true - fi + # fi if [ -z $action ] || [ "${action}" = "gui" ]; then ENTER2CONTINUE fi