Summary stats of a backup made with restic 0.16.4

Hi everyone.
I’m using restic version 0.16.4 on some servers and version 0.17.3 on other servers.

I am using restic 0.17.3 on my pc to execute the commands listed below.

Running “restic snapshot --json” querying a snapshot that was made with version 0.16.4 the programs return this response :

{
“hostname”: “…”,
“id”: “4be…93”,
“parent”: “…”,
“paths”:
,
“program_version”: “restic 0.16.4”,
“short_id”: “4b…5”,
“tags”:
[ ],
“time”: “2025-03-01T19:45:36.6464733+01:00”,
“tree”: “…”,
“username”: “…”
}

Running the same command against a snapshot that was made with version 0.17.3 the programs return this response :
{
“hostname”: “…”,
“id”: “5b…6b”,
“parent”: “fc…27”,
“paths”:
,
“program_version”: “restic 0.17.3”,
“short_id”: “5…a”,
“summary”:
{
“backup_end”: “2025-03-01T21:49:14.8466674+01:00”,
“backup_start”: “2025-03-01T21:45:53.1359288+01:00”,
“data_added”: 17065108,
“data_added_packed”: 1496346,
“data_blobs”: 50,
“dirs_changed”: 4,
“dirs_new”: 0,
“dirs_unmodified”: 0,
“files_changed”: 25,
“files_new”: 0,
“files_unmodified”: 150,
“total_bytes_processed”: 764177966,
“total_files_processed”: 175,
“tree_blobs”: 5
},
“tags”:
,
“time”: “2025-03-01T21:45:53.1359288+01:00”,
“tree”: “f7…a”,
“username”: “…”
}

Essentially I am missing the summary section for the backups that were made with version 0.16.4

I have got the same situation if I run “restic ls --json”.

Is there any chance to retrieve the summary section the backup made with version 0.16.4 ?
I am upgrading and aligning the version of restic on the servers, but it would be nice to have those statistics for previous backups.

Thank you in advance.

Paolo

1 Like

Unless I’m misunderstanding, the extended stats were implemented in Store snapshot statistics & print snapshot size by MichaelEischer · Pull Request #4705 · restic/restic · GitHub, and they are populated when the backup is being created. Quoting the relevant bit from the release notes for 0.17.0:

The snapshots command now prints the size for snapshots created using this or a future restic version. To achieve this, the backup command now stores the backup summary statistics in the snapshot.

My understanding is this this means that the snapshot would have to have been created with restic 0.17.0 or higher to have the statistics stored.

2 Likes