Repository navigation
Backup always starts immediately instead of given time V5.0.4 #581
|
I am trying to run dbb daily @ 03:00, a "quiet" time for backups. Environment: Docker, Raspberry Pi, SSD, daily offload of completed backups through Windows to offline storage. Relevant Docker compose parameters: I expect dbb to run daily @ 03:00. With V4 this was the case, now with V5 it runs once on starting the container - unexpected and not wanted but "survivable". Next run will not be at 03:00 next morning but 24 hours after the initial run. HOW do I configure dbb properly to run each and every day at 03:00 and NOT automatically at startup? I must be overlooking something..... |
Replies: 3 comments
|
Set the begin time per job instead of through DEFAULT_. In 5.0.4 - DEFAULT_BACKUP_INTERVAL=1440
- DB01_BACKUP_BEGIN=0300
- DB02_BACKUP_BEGIN=0300Or use a cron expression, which doesn't need the interval at all: - DB01_BACKUP_BEGIN=0 3 * * *
- DB02_BACKUP_BEGIN=0 3 * * *The cause is in container/rootfs/container/functions/10-dbbackup (line 621): the interval gets local begin="$(_dbbackup_getv "${inst}" BACKUP_BEGIN "+0")"It only looks at I checked it with the 5.0.4 image and throwaway MariaDB and Postgres containers. With your settings the log shows One thing to check: the time is container local time, so set Does that give you the 03:00 run again? |
|
@wmorin Also, thanks for the remark about TZ. All my servers and my main workstation run UTC. Personal quirk ;) I did add the cron version to both jobs which solved my problem: Now fix the other instances..... |
|
#582 - I've turned this into an issue - this is indeed a bug in config generation on the the container. Fix details are there! |
Set the begin time per job instead of through DEFAULT_. In 5.0.4
DEFAULT_BACKUP_BEGINis never read, so every job falls back to+0(start now) and then repeats every 1440 minutes from that moment:Or use a cron expression, which doesn't need the interval at all:
The cause is in container/rootfs/container/functions/10-dbbackup (line 621): the interval gets
${DEFAULT_BACKUP_INTERVAL}as fallback, but the begin value is hardcoded:It only looks at
DBxx_BACKUP_BEGIN…