-
Notifications
You must be signed in to change notification settings - Fork 81
Introduce ENABLE_JSON_LOGGING
#216
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
base: master
Are you sure you want to change the base?
Conversation
This change adds the `ENABLE_JSON_LOGGING` option to export restic metadata in JSON format. The goal is to improve accessibility by allowing users to utilize tools like `jq` to process the metadata. This enables users to create external scripts for extracting metadata and sending notifications using `run_commands`. update doc and include notify script as sample to send backup metadata via apprise Export `LOG_FILE` and create docker-compose for contributing - export `LOG_FILE` so it will be available for subprocess executed via `run_commands` - Add docker-compose.contribute.yml facilitate contributing process - make `notify` executable and copy it to /usr/local/bin - notify: update content to only include summary and errors for now. jq was complaining on payload too large when using verbose mode. - update doc
|
Hi @jeankhawand please any idea why it is still not deployed ? |
|
@djmaze that's will also make it easy to restore snapshots in the futur |
djmaze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply.. This looks good to me! But will need a test, see below.
| - `SKIP_INIT` - Skip initialization of the restic repository, even if it can not be accessed. | ||
| - `SKIP_INIT_CHECK`- Do not fail, if initialization of the restic repository fails for whatever reason. | ||
|
|
||
| - `ENABLE_JSON_LOGGING` = Converts Restic's standard output to JSON format. This allows users to leverage tools like `jq` to extract specific fields from the metadata. Additionally, it supports calling external scripts for further processing, such as [executing commands after a backup](#execute-commands-after-backup). For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should also document that the LOG_FILE env variable is set for the commands to be used.
| @@ -0,0 +1,72 @@ | |||
| version: "3.3" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you added this file and what the name is exactly about? IMO we can just remove this.
| @@ -0,0 +1,83 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functionality should also be tested. I will add a test.
|
@jeankhawand, Hi! I'm also thinking about visualization and notifications now. What your setup is in the end? Did you switch to another wrapper or do you use your fork? |

This change adds the
ENABLE_JSON_LOGGINGoption to export restic metadata in JSON format. The goal is to improve accessibility by allowing users to utilize tools likejqto process the metadata. This enables users to create external scripts for extracting metadata and sending notifications usingrun_commands.update doc and include notify script as sample to send backup metadata via apprise
Export
LOG_FILEand create docker-compose for contributingLOG_FILEso it will be available for subprocess executed viarun_commandsnotifyexecutable and copy it to /usr/local/bin