[Stats] Snapshots processed missing in json format

Hi everyone,
If I used the stats with --json parameter, I hope to have this information:

  • Snapshots processed
  • Total File Count
  • Total Size

But, I only get this information:

  • Total File Count
  • Total Size

This information is missing:

  • Snapshot processed

Do you know if this is the expected behavior or not? Because, I use PowerShell to automate some action on my computer, and I hope to get the information missing in the json format.

Here the code I use:

$> Function Start-Command ($commandTitle, $commandPath, $commandArguments) {
    Try {
        $oProcessInfo                        = New-Object System.Diagnostics.ProcessStartInfo
        $oProcessInfo.FileName               = $commandPath
        $oProcessInfo.RedirectStandardError  = $true
        $oProcessInfo.RedirectStandardOutput = $true
        $oProcessInfo.UseShellExecute        = $false
        $oProcessInfo.Arguments              = $commandArguments
        $oProcess                            = New-Object System.Diagnostics.Process
        $oProcess.StartInfo                  = $oProcessInfo

        $oProcess.Start() | Out-Null

        [PSCustomObject]@{
            commandTitle = $commandTitle
            stdout       = $oProcess.StandardOutput.ReadToEnd()
            stderr       = $oProcess.StandardError.ReadToEnd()
            ExitCode     = $oProcess.ExitCode
        }

        $oProcess.WaitForExit()
    } Catch {
        exit
    }
}

$> $sCommonResticArguments = "-r `"D:\Utilisateurs\TheBlackWizard\Jeux\Backup\Playnite\Archives`" --password-file `"C:\Users\The Black Wizard\AppData\Local\Temp\tmp4261.tmp`""

$> $oStatsJson = Start-Command "Restic Stats" restic "$($sCommonResticArguments) stats --json"
$> $oStats = Start-Command "Restic Stats" restic "$($sCommonResticArguments) stats"

$> $oStatsJson.stdout
{"total_size":30634682417,"total_file_count":152129}

$> $oStats.stdout
scanning...
Stats in restore-size mode:
Snapshots processed:   291
   Total File Count:   152129
         Total Size:   28.531 GiB

Thanks a lot!

That looks like an oversight. Please open a new issue on Github

Ok, thank you.

I will open it soon.