I am using restic 0.17.3 to run backups with --json
flag. I am not sure if it’s a bug or a limitation, but the output at the end of the backup does not specify when a file/folder is removed. Here is a sample output of a restic backup
command after removing a file:
{
message_type: 'summary',
files_new: 0,
files_changed: 0,
files_unmodified: 88,
dirs_new: 0,
dirs_changed: 4,
dirs_unmodified: 1,
data_blobs: 0,
tree_blobs: 4,
data_added: 3526,
data_added_packed: 2016,
total_files_processed: 88,
total_bytes_processed: 176650704,
total_duration: 0.022724,
snapshot_id: '8316562f69be88fa743b0751c9eb08ca5baff5a4a0eb826c2a59ea5dd70f9a51'
}
But after the backup, when I run the restic diff
command to compare the latest snapshot with the previous one, I get the correct stats:
{
"message_type": "statistics",
"source_snapshot": "f05fdae4",
"target_snapshot": "8316562f",
"changed_files": 0,
"added": {
"files": 0,
"dirs": 0,
"others": 0,
"data_blobs": 0,
"tree_blobs": 5,
"bytes": 9323
},
"removed": {
"files": 1,
"dirs": 0,
"others": 0,
"data_blobs": 0,
"tree_blobs": 5,
"bytes": 10175
}
}
I am guessing restic actually prints out the move/copy stats at the end of the backup, but not the actual change counts like the diff command does. Is it possible to incorporate the removed count in the summary of the backup summary output (files_removed, dirs_removed)?
Best Regards