Update nodemgmt-scripts.sh

This commit is contained in:
2023-09-04 14:12:59 -05:00
parent 3a182afb45
commit 1fd1ce698b

View File

@@ -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(){