From 1fd1ce698ba688edb3ad716f247ec54604fedb25 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 4 Sep 2023 14:12:59 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d3b3bcc2..a6638956 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -580,13 +580,6 @@ BACKUP_OFFSITEPFSENSE(){ scp root@10.2.1.1:/cf/conf/conf* ${newBAKFOLDER}/ ssh root@10.2.1.1 rm -f /cf/conf/conf_backup.tar.gz - if [ "$(date +%u)" == "1" ]; then - cp -r ${newBAKFOLDER} ${newBAKFOLDER/-D/-W} - fi - if [ "$(date +%d)" == "04" ]; then - cp -r ${newBAKFOLDER} ${newBAKFOLDER/-D/-M} - fi - dailyfilestokeep=(`ls -d ${BAKFOLDER}/*-D 2> /dev/null | tail -7`) weeklyfilestokeep=(`ls -d ${BAKFOLDER}/*-W 2> /dev/null | tail -4`) monthlyfilestokeep=(`ls -d ${BAKFOLDER}/*-M 2> /dev/null | tail -12`) @@ -606,6 +599,13 @@ BACKUP_OFFSITEPFSENSE(){ [ $keep == 0 ] && rm -rf ${i} done + if [ "$(date +%u)" == "1" ]; then + cp -r ${newBAKFOLDER} ${newBAKFOLDER/-D/-W} + fi + if [ "$(date +%d)" == "04" ]; then + cp -r ${newBAKFOLDER} ${newBAKFOLDER/-D/-M} + fi + } RUN_COMMAND(){