Skip to content

Systemd: Add dependency between jobs #674

Description

@fdw

I have two backup jobs configured for similar sources. Both use a pre hook to export from a DB to a text file, and a post hook to delete the export again. I want to run both jobs at roughly the same time.

Currently, they're both started together, and one will complain that the export already exist (not a problem). But when the first job is done, it will remove the export file, and the second job will run into problems backing it up.

I see two possible solutions, but no way to implement them:

  1. resticprofile must understand that the hooks are to be executed before/after both jobs, not for each of them.
  2. I could add a dependency to a job to only run when its sibling is done. I could manually set a different starting time, but that depends on when the first job is finished, which might differ significantly.

Any suggestions how to do this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions