You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on every 1st of each month the following suggested entry in crontab:
00 04 * * * /path/to/elabctl backup
leads to a double execution of the backup. This is an issue of crontab, nevertheless this results in two failures in the gzip compression of the sql dump file and the whole DB backup is useless on that date.
Expected Behavior
clean gzipped sql dump for each day
Steps to reproduce the behavior
crontab -e
00 04 * * * /path/to/elabctl backup
check gziped backup files over two months
on the first of each month the compressed sql dump files are corrupt
Do you have any idea what may have caused this?
crontab fires two instances simultaneously of the backup script on the 1st of each month
Do you have an idea how to solve the issue?
Solution: this might be prevented simply by using the flock command in the crontab entry such as:
Detailed description of the problem
on every 1st of each month the following suggested entry in crontab:
00 04 * * * /path/to/elabctl backup
leads to a double execution of the backup. This is an issue of crontab, nevertheless this results in two failures in the gzip compression of the sql dump file and the whole DB backup is useless on that date.
Expected Behavior
clean gzipped sql dump for each day
Steps to reproduce the behavior
Do you have any idea what may have caused this?
crontab fires two instances simultaneously of the backup script on the 1st of each month
Do you have an idea how to solve the issue?
Solution: this might be prevented simply by using the flock command in the crontab entry such as:
00 04 * * * flock -n /path/to/some/lockfile /path/to/elabctl backup >> log.txt 2>> err.log.txt
or: some locking logic will be implemented in the elabctl script.
What is your docker-compose configuration?
Output of
uname -a
Output of
cat /etc/os-release
Output of
docker info
Relevant php error log entry
Additional information
NA
The text was updated successfully, but these errors were encountered: