YunoHost-Apps / borgserver_ynh

Borg server package for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
9 stars 5 forks source link

Backup alert bug #51

Closed NoWiS- closed 2 years ago

NoWiS- commented 2 years ago

Describe the bug

Cron report a failure to execute the monitoring of a backup:

Mail subject:

Cron <root@SERVER> : Monitor BACKUP_NAME backup ; ALERT_DELAY="$(grep '^alert_delay: ' /etc/yunohost/apps/borgserver/settings.yml | awk '{print $2}')"; [[ $(find /home/BACKUP_NAME/backup/data -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]] || ( echo "No file has been backuped in /home/BACKUP_NAME since ${ALERT_DELAY} days" | mail -s "[YNH] Backup missing : BACKUP_NAME" $(grep '^alert_mails: ' /etc/yunohost/apps/borgserver/settings.yml | awk '{print $2}'))

Mail content:

find: invalid argument `-'1'' to `-mtime'

Context