Permalink
Browse files

Save redundant backup to home folder, not /root

  • Loading branch information...
NEMS Linux
NEMS Linux committed Nov 19, 2018
1 parent 88e9c9d commit 13d689a759a0104c44e3376482fde96e2c9f91fa
Showing with 6 additions and 2 deletions.
  1. +6 −2 restore.sh
@@ -159,7 +159,10 @@ else
service $nagios stop
# I know I warned you, but I love you too much to let you risk it.
cp -p /var/www/html/backup/snapshot/backup.nems /root/
DATE=`date '+%Y-%m-%d %H:%M:%S'`
USERNAME=`/usr/local/bin/nems-info username`
REDUNDANCY="/home/$USERNAME/$DATE - backup.nems"
cp -p /var/www/html/backup/snapshot/backup.nems "$REDUNDANCY"
if (( $(awk 'BEGIN {print ("'$backupver'" >= "'1.4'")}') )); then
confsrc=/etc/nems/conf
@@ -286,7 +289,8 @@ else
echo I hope everything worked okay for you.
echo Please let me know if you had any trouble.
echo ""
echo PS - I saved a backup for you of the old config. /root/backup.nems
echo PS - I saved a backup for you of the old config.
echo $REDUNDANCY
echo ... just in case
echo ""

0 comments on commit 13d689a

Please sign in to comment.