I have a systemd service that runs restic stats --json --mode raw-data to obtain the stats in JSON form. However, recently the output is also accompanied by some progress information:
[0:00] 0.00% 1 / 241 snapshots, 0 B
[0:00] 0.41% 2 / 241 snapshots, 0 B
[0:00] 2.07% 6 / 241 snapshots, 0 B
[0:00] 4.15% 11 / 241 snapshots, 0 B
[0:00] 6.22% 16 / 241 snapshots, 0 B
[0:00] 8.71% 22 / 241 snapshots, 0 B
[0:01] 9.54% 24 / 241 snapshots, 0 B
[0:01] 11.20% 28 / 241 snapshots, 0 B
[0:01] 13.28% 33 / 241 snapshots, 0 B
[0:01] 15.77% 39 / 241 snapshots, 0 B
[0:01] 17.84% 44 / 241 snapshots, 0 B
[0:01] 20.33% 50 / 241 snapshots, 0 B
[0:01] 23.24% 57 / 241 snapshots, 0 B
[0:01] 25.73% 63 / 241 snapshots, 0 B
[0:01] 27.80% 68 / 241 snapshots, 0 B
[0:01] 30.29% 74 / 241 snapshots, 0 B
[0:02] 32.37% 79 / 241 snapshots, 0 B
[0:02] 35.27% 86 / 241 snapshots, 0 B
[0:02] 36.93% 90 / 241 snapshots, 0 B
[0:02] 39.42% 96 / 241 snapshots, 0 B
[0:02] 42.32% 103 / 241 snapshots, 0 B
[0:02] 45.23% 110 / 241 snapshots, 0 B
[0:02] 48.13% 117 / 241 snapshots, 0 B
[0:02] 51.04% 124 / 241 snapshots, 0 B
[0:02] 53.53% 130 / 241 snapshots, 0 B
[0:02] 55.60% 135 / 241 snapshots, 0 B
[0:03] 58.92% 143 / 241 snapshots, 0 B
[0:03] 61.83% 150 / 241 snapshots, 0 B
[0:03] 64.32% 156 / 241 snapshots, 0 B
[0:03] 66.39% 161 / 241 snapshots, 0 B
[0:03] 70.54% 171 / 241 snapshots, 0 B
[0:03] 72.61% 176 / 241 snapshots, 0 B
[0:03] 74.69% 181 / 241 snapshots, 0 B
[0:03] 78.01% 189 / 241 snapshots, 0 B
[0:03] 80.08% 194 / 241 snapshots, 0 B
[0:03] 84.65% 205 / 241 snapshots, 0 B
[0:04] 87.55% 212 / 241 snapshots, 0 B
[0:04] 90.46% 219 / 241 snapshots, 0 B
[0:04] 94.19% 228 / 241 snapshots, 0 B
[0:04] 97.10% 235 / 241 snapshots, 0 B
[0:04] 99.17% 240 / 241 snapshots, 0 B
[0:04] 99.59% 241 / 241 snapshots, 98016 blobs, 10.421 GiB
[0:04] 100.00% 241 / 241 snapshots, 131001 blobs, 10.458 GiB
{"total_size":11229108766,"total_uncompressed_size":20209341997,"compression_ratio":1.7997280477138804,"compression_progress":100,"compression_space_saving":44.436049587032976,"total_blob_count":131001,"snapshots_count":241}
When running from the command line, I also see the progress information. Adding --quiet suppresses the progress while the command is running, but the progress still appears in the output:
$ restic stats --json --quiet --mode raw-data
[0:04] 100.00% 241 / 241 snapshots, 131001 blobs, 10.458 GiB
{"total_size":11229108766,"total_uncompressed_size":20209341997,"compression_ratio":1.7997280477138804,"compression_progress":100,"compression_space_saving":44.436049587032976,"total_blob_count":131001,"snapshots_count":241}
Is there a way to get just the JSON without the progress? This is using restic 0.19.0 on Linux.