Permalink
Browse files

Create backup.nems every 30 minutes

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jan 22, 2019
1 parent 30f702d commit fd6610498e08485d7e44e5224b25962343a7c8df
Showing with 3 additions and 3 deletions.
  1. +3 −3 backup.sh
@@ -12,11 +12,11 @@ ver=$(/usr/local/bin/nems-info nemsver)
nagvis="etc/maps/"
fi

# Only create a backup file every 6 hours.
# Only create a backup file every 30 minutes.
if [[ -f /var/www/html/backup/snapshot/backup.nems ]]; then
if ! test `find "/var/www/html/backup/snapshot/backup.nems" -mmin +360`
if ! test `find "/var/www/html/backup/snapshot/backup.nems" -mmin +30`
then
# Current backup file is less than 6 hours old. Abort.
# Current backup file is less than 30 minutes old. Abort.
exit
fi
fi

0 comments on commit fd66104

Please sign in to comment.