I’m looking and pushing some data into influx for monitoring backups. And will be using the restic snapshots --json output to do so.
It has the time, but it’d be nice if it had some of this information in the snapshot data:
Added to the repository: 807.399 MiB (807.742 MiB stored)
processed 1154368 files, 201.752 GiB in 35:58
So that I didn’t have to calculate it externally
Print out the backup size when listing snapshots (enhancement) · Issue #693 · restic/restic · GitHub
This is also already implemented in
--json option is available in the beta builds and the soon-coming 0.3.1 version)
But afaik it already has (at least some of) this data, no?
You can use
backup command too.
Here is an example output:
You might need to set
RESTIC_PROGRESS_FPS to a different value if you don’t care about progress data though (
--json output of
restic backup, one can obtain the information, but then the live output in text format is not there. And you have to capture the output of each
restic backup in a separate log file and this kind of monitoring can’t be done on the repository alone. This is the reason for
I would like to log what happened during a backup or forget command, in particular when run automatically via systemd. But also for a manual run, because it then behaves the same no matter if I start it or systemd. To this end, I use these options (simplified):
restic backup ... --json | grep summary > ~/resticlogs/backup_$(date).json
restic forget ... --json > ~/resticlogs/forget_$(date).json
However, these commands, I have no output on the command line and for longer backups I cannot see wha…
Having this information in the
restic snapshots --json output would make such monitoring much easier. Keeping separate log files of backup processes would not be required.
Yeah I’ve got my backups (resticker) writing json files at completion, then will read those in another process. So I’ll only be able to use those as source, no other logs.