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

Add webhook to "manually" start a plan #214

Open
zaggash opened this issue Apr 12, 2024 · 6 comments
Open

Add webhook to "manually" start a plan #214

zaggash opened this issue Apr 12, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@zaggash
Copy link

zaggash commented Apr 12, 2024

Describe the solution you'd like
Rather than starting a plan out of a cron, would be nice to trigger it from an API endpoint as a webhook.
This would allow other apps to trigger the backup when this other process is ending.

Additional context
I'm thinking of backing up immich when the Postgres backup is done and moved to the upload folder.
My DB backup script can curl the webhook to trigger the backrest plan.

@zaggash zaggash added the enhancement New feature or request label Apr 12, 2024
@zaggash
Copy link
Author

zaggash commented Apr 12, 2024

Not exactly the same as #143 because here it would involve external services/scripts.

IIUC #143 is talking about plans order

@garethgeorge
Copy link
Owner

Hmm, I don't think backrest has a stable enough public API as of yet to expose anything explicit / make any promises on the API contract (and there are likely major refactors coming as I work towards multi-host management and am generally cleaning up tech debt). The workaround for this use case would be using restic directly and using the "Index Snapshots" button in the backrest UI to load your recent backup runs (but you lose out on Backrest's automatic prunes / notifications in that case).

If you do want to code something to Backrest's API it's specified in the Backrest service https://github.com/garethgeorge/backrest/blob/main/proto/v1/service.proto#L32-L33 and you're welcome to codegen a library using connectrpc to call backrest's endpoints https://connectrpc.com/. You can see how the webui initializes it's transport here https://github.com/garethgeorge/backrest/blob/main/webui/src/api.ts#L1.

@asitemade4u
Copy link

I am also interested in the feature

@asitemade4u
Copy link

BTW, at one point @garethgeorge , you mentioned the Index Snapshots. Where can I find it?

@garethgeorge
Copy link
Owner

garethgeorge commented Apr 22, 2024

An Index Snapshots button is at the top of the repo overview e.g. on my install --
image

@garethgeorge
Copy link
Owner

Documented workaround at #275 .

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

No branches or pull requests

3 participants