docker-db-backup icon indicating copy to clipboard operation
docker-db-backup copied to clipboard

DB01_BACKUP_BLACKOUT parameters ain't working as expected

Open rltas opened this issue 1 year ago • 3 comments

Summary

With a blackout period of 1800 to 0800, backups are still running hourly with the default backup begin time of 2am.

Steps to reproduce

compose.yaml:

...
services:
  db-backup:
    image: tiredofit/db-backup:4.1.4
    environment:
      DEFAULT_BACKUP_BEGIN: "0200"
      DB01_BACKUP_INTERVAL: ${DB_BACKUP_INTERVAL:-1440}
      DB01_BACKUP_BLACKOUT_BEGIN: ${DB_BACKUP_BLACKOUT_BEGIN}
      DB01_BACKUP_BLACKOUT_END: ${DB_BACKUP_BLACKOUT_END}
...

.env:

DB_BACKUP_INTERVAL=60
DB_BACKUP_BLACKOUT_BEGIN=1800
DB_BACKUP_BLACKOUT_END=0800

Resulting in this actual container environment:

DB01_BACKUP_BLACKOUT_BEGIN=1800
DB01_BACKUP_BLACKOUT_END=0800
DB01_BACKUP_INTERVAL=60
DEFAULT_BACKUP_BEGIN=0200

What is the expected correct behavior?

Backups aren't running between 1800 and 0800.

Possible fixes

https://github.com/tiredofit/docker-db-backup/blob/4fc54e2232f02a1062f57ac7c945248dea6a7ae6/install/assets/dbbackup/template-dbbackup/run#L73 https://github.com/tiredofit/docker-db-backup/blob/4fc54e2232f02a1062f57ac7c945248dea6a7ae6/install/assets/functions/10-db-backup#L204 Shouldn't these match?

rltas avatar Sep 12 '24 08:09 rltas

Still doesn't work as of today with version 4.1.12.

rltas avatar Jan 21 '25 22:01 rltas

Still ignored in 4.1.16, adding DEFAULT_BACKUP_BLACKOUT_BEGIN and DEFAULT_BACKUP_BLACKOUT_END also didn't help.

rltas avatar Mar 31 '25 09:03 rltas

Still doesn't work in 4.1.21. Setting DEFAULT_BACKUP_BEGIN outside the blackout period also doesn't help.

rltas avatar Sep 03 '25 07:09 rltas