creativeprojects / resticprofile

Configuration profiles manager and scheduler for restic backup
https://creativeprojects.github.io/resticprofile/
GNU General Public License v3.0
751 stars 33 forks source link

Schedules dropping out of crontab file #372

Open danieldietzler opened 4 months ago

danieldietzler commented 4 months ago

Hey!

Problem

Recently I've seen specific backup schedules just not being executed anymore (after working perfectly fine for a while and not touching anything). After trying to dig into it I've seen that /etc/crontabs/root doesn't have entries for those schedules anymore. Recreating the docker container (and thus causing it to re-create the schedules) always fixes the issue for a while - until suddenly the schedules stop working again and they're removed from the cron file. Additionally, it seems to always be the same backup and check schedule that's dropping out of that file at some point; thor_appdata_array.

Installation

Excerpt of the profiles file

thor_boot_drive:
    inherit: default
    initialize: true
    verbose: true
    backup:
        source: "/source/boot"
        schedule: "06,12,18,00:05"
        schedule-permission: system
        schedule-log: /logs/backup-{{ .Profile.Name }}.log
        run-after: "curl <omitted>"
        run-after-fail: "curl <omitted>"
    check:
        schedule: "*-*-1"
        schedule-permission: system
        schedule-log: /logs/check-{{ .Profile.Name }}.log

thor_appdata:
    inherit: default
    initialize: true
    verbose: true
    backup:
        source: "/source/appdata"
        schedule: "02:10"
        schedule-permission: system
        schedule-log: /logs/backup-{{ .Profile.Name }}.log
        run-after: "curl <omitted>"
        run-after-fail: "curl <omitted>"
        exclude:
          - "*/postgres"
          - "setup"
          - "postgres"
    check:
        schedule: "*-*-1"
        schedule-permission: system
        schedule-log: /logs/check-{{ .Profile.Name }}.log

thor_appdata_array:
    inherit: default
    initialize: true
    verbose: true
    backup:
        source: "/source/appdata-array"
        schedule: "02:30"
        schedule-permission: system
        schedule-log: /logs/backup-{{ .Profile.Name }}.log
        run-after: "curl <omitted>"
        run-after-fail: "curl <omitted>"
        pack-size: 64
    check:
        schedule: "*-*-1"
        schedule-permission: system
        schedule-log: /logs/check-{{ .Profile.Name }}.log
creativeprojects commented 4 months ago

This is most certainly weird đŸ¤”

What's happening with the crontab file?

danieldietzler commented 4 months ago

Hey, thanks for the quick reply! The crontab file still exists, but the two schedules related to the appdata_array schedules (backup and check) are just gone.