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

Post & pre commands support #9

Merged
merged 11 commits into from
Feb 11, 2022
Merged

Post & pre commands support #9

merged 11 commits into from
Feb 11, 2022

Conversation

hadret
Copy link
Owner

@hadret hadret commented Feb 9, 2022

This PR fixes a lot of long standing bugs, but also provides the following features:

  • pre_ and post_ commands can now be added to the jobs, like so:
 jobs:
   - command: 'restic-backblaze-example backup /var'
     at: '0 4  * * *'
     pre_command: 'mysqldump --all-databases > /srv/my.sql'
   - command: 'restic-backblaze-example backup /home'
     at: '0 3  * * *'
     user: 'restic'
     post_command: 'systemctl restart some-app'
   - command: 'restic-backblaze-example backup /var/or/sth'
     at: '0 5  * * *'
     pre_command: 'mysqldump --all-databases > /srv/my.sql'
     post_command: 'systemctl restart some-app'

Not specifying these jobs is fine and backwards compatible (closes #4).

  • user has ben brought back and now can be specified in the job scope (otherwise it will fallback to the restic_user).
  • quite some bug fixes in tests and test-related things; Travis CI should now also test against Rocky Linux 8.

@hadret hadret merged commit e915950 into master Feb 11, 2022
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

Successfully merging this pull request may close these issues.

Run pre and post script before and after restic
1 participant