Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] make 'check' run by 'backup' configurable #450

Open
seternate opened this issue Jan 9, 2025 · 2 comments
Open

[feature] make 'check' run by 'backup' configurable #450

seternate opened this issue Jan 9, 2025 · 2 comments

Comments

@seternate
Copy link

Hi there,

I hope I did not overlooked any documentation or any thread on the forum, but I have a use-case here. Please refer me or/and reject if so.

I want to have a check run on each repo without "--read-data" flag after each backup to ensure integrity of that backup. Easy said easy done, just add the "check-after". But I also want to run the check once a week with the "--read-data" flag enabled to ensure integrity, but since it is heavy and takes quite a while I want to run it just weekly.
Problem now is, if I configure the "check" with "read-data: true" and schedule it to run every week, the check run by the "backup" also runs with "read-data" flag.

It would be cool to be able to either configure multiple check sections with different schedules to run one without "read-data" flag and one with the flag or the ability to configure the check run by "backup" to not use the "read-data" flag.

Current config:

version: "1"

global:
  scheduler: crond

default:
  repository: "local:/backup"
  password-file: "/password"

  backup:
    schedule: daily
    check-after: true
    source:
      - "/source"

  check:
    schedule: weekly
    read-data: true

Example of possible config:

version: "1"

global:
  scheduler: crond

default:
  repository: "local:/backup"
  password-file: "/password"

  backup:
    schedule: daily
    check-after:
      read-data: false
    source:
      - "/source"

  check:
    schedule: weekly
    read-data: true
@creativeprojects
Copy link
Owner

I see what you mean.
It might not be the prettiest but you can easily achieve this by using two profiles:

version: "1"

global:
  scheduler: crond

default:
  repository: "local:/backup"
  password-file: "/password"

  backup:
    schedule: daily
    check-after: true
    source:
      - "/source"
  
  check:
    read-data: false

weekly-check:
  inherit: default
  check:
    schedule: weekly
    read-data: true

(The check section in the default is not really needed by it helps remembering what it does when you come back to it later 😆)

@seternate
Copy link
Author

Yeah, this is exactly what I do as a "workaround" right know. Works good, BUT could be prettier. If you think this is nothing needed close the issue, else this would be very cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants