I wonder if there’s an easy way to get a restic logfile which just contains the modified file per snapshot.
If I use --verbose I’ll get a neat status, but its “online” only. Using --verbose=2 could be used to be redirected to a logfile, but that is just too verbose, i.e. lists all unchanged files.
I’m stuck with windows for my machine, so no grep -v on-the-fly possible…
Is there something in between I’m missing? I’d rather not compare snapshots to find out which files changed.
As to why I’d like to have this: I just like to have a quick overview what has recently changed… I’m new to restic and try to monitor it to get the feeling right
Thanks for the suggestion. Unfortunately --json combined with --verbose does not contain the changed files. And again, combined with --verbose=2 it contains all files, even unchanged ones.
There are several topics in the forum that have methods of getting the changed/added/deleted listing. The following works for me. I use this at the end of the bash script for backups. The script is executed as a cron job so I get the results emailed to myself. If there aren’t a lot of changes then running it from a console is satisfactory.
For anyone searching for a solution to skip the unchanged files and show only the modified/deleted/added files, the best option is to remove the lines that start with unchanged from the output with sed by piping the output of restic to it:
restic backup | sed '/^unchanged/d'
I created a backup.sh that contains this code so I can easily run it without typing over and over.
The benefit of this approach is that the output is live, line after line, but the lines with the unchanged files are simply skipped.