mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-02-17 09:23:56 +00:00
Ensure that only a single backup runs at one time
This commit is contained in:
committed by
Tobias Kaupat
parent
317ecba765
commit
ed609ae89d
2
entry.sh
2
entry.sh
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
|
||||
echo "Setup backup cron job with cron expression BACKUP_CRON: ${BACKUP_CRON}"
|
||||
echo "${BACKUP_CRON} /bin/backup >> /var/log/cron.log 2>&1" > /var/spool/cron/crontabs/root
|
||||
echo "${BACKUP_CRON} /usr/bin/flock -n /var/run/backup.lock /bin/backup >> /var/log/cron.log 2>&1" > /var/spool/cron/crontabs/root
|
||||
|
||||
# Make sure the file exists before we start tail
|
||||
touch /var/log/cron.log
|
||||
|
||||
Reference in New Issue
Block a user