Permalink
Browse files

NEMS Backup no longer stores logs

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jan 9, 2019
1 parent ff658d5 commit e687fd255916dc5e0e810f9781f2d62708e4b880
Showing with 17 additions and 1 deletion.
  1. +1 −1 backup.sh
  2. +16 −0 offsite-backup.sh
@@ -52,7 +52,7 @@ ver=$(/usr/local/bin/nems-info nemsver)
mainpub="$mainpub \
/var/www/htpasswd \
/etc/nagvis/$nagvis \
/var/log/ \
/var/log/nems/ \
/var/lib/mysql/ \
/etc/rc.local \
"
@@ -19,6 +19,22 @@ fi;
data=$(curl -s -F "hwid=$hwid" -F "osbkey=$osbkey" -F "query=status" https://nemslinux.com/api-backend/offsite-backup-checkin.php)
if [[ $data == '1' ]]; then # this account passes authentication

if pidof -o %PPID -x "backup.sh">/dev/null; then
echo "Standby... backup is running."
sleep 5
v=0
while pidof -o %PPID -x "backup.sh">/dev/null
do
v=$(($v+1))
if [[ $v -ge 120 ]]; then
echo "It has been 10 minutes and backup is still running. Aborted."
exit 1
fi
sleep 5
done
fi


# Encrypt the file
# Combine the user's passphrase with the OSB Key to further strenghten the entropy of the passphrase
gpg --yes --batch --passphrase="::$osbpass::$osbkey::" -c /var/www/html/backup/snapshot/backup.nems

0 comments on commit e687fd2

Please sign in to comment.