Skip to content

Listing keys in json format returns only short ids #4744

@frabe1579

Description

@frabe1579

Output of restic version

restic 0.16.4 compiled with go1.21.6 on windows/amd64

What backend/service did you use to store the repository?

local folder

Problem description / Steps to reproduce

Running command "restic key list --json" on a repository, the json returned contais ids of keys, but these ids are sort ids (8 chars), not full length ids (as from sha256 hash).

Example of output:
[{"current":true,"id":"94da42a0","userName":"******","hostName":"*****","created":"2024-03-30 20:50:53"}]

Other commands, like restic snapshots --json returns long ids.

This is not a critical bug, because keys are few and collisions are very rare, but anyway the id is not a full id.

I use restil key list, restik key add and restic key remove to rotate passwords.

Expected behavior

Json contains long ids of keys.

Actual behavior

Ids are short.

Do you have any idea what may have caused this?

No, sorry.

Did restic help you today? Did it make you happy in any way?

Every day happy! :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions