You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to see a new option called --cid (i.e Custom ID).
When a backup succeeds, restic will use the --cid instead of computing one.
It's the caller responsability to provide Unique CID with the same size as restic generated ones.
In case of multiple paths to backup, the caller must provides the same number of CID:
Example with two paths:
$ restic --cid=bdbd343940dc1520 --cid=797661759f0bc19e -r /tmp/backup backup ~/path1.txt ~/path2.txt
Actual behavior
By default, restic generates its own ID (see first column below).
$ restic -r /tmp/backup snapshots
enter password for repository:
ID Date Host Tags Directory
----------------------------------------------------------------------
40dc1520 2015-05-08 21:38:30 kasimir /home/user/work
79766175 2015-05-08 21:40:19 kasimir /home/user/work
bdbd3439 2015-05-08 21:45:17 luigi /home/art
590c8fc8 2015-05-08 21:47:38 kazik /srv
9f0bc19e 2015-05-08 21:46:11 luigi /srv
Rational
As our backups grow more and more, we found ourselves managing 2 types of IDs.
The ones generated by restic, and the ones stored in our legacy database.
Matching between them becomes hard and very cumbersome.
We would like to unify everything by using one, and only one ID.
The text was updated successfully, but these errors were encountered:
yhafri
changed the title
Support for custom user "--cid" (feature)
Support for custom user ID "--cid" (feature)
Mar 17, 2017
Thanks for suggesting this issue. The IDs for the snapshots are the file names of the (encrypted) snapshots as stored in the repo, which means the ID is the SHA256 hash of the encrypted snapshot data. That's the way the storage works. Among others, this guarantees (with very high probability) that there are no collisions between two snapshots, even if different machines are involved. This will not change.
If you need your own ID attached to a snapshot, you can use a tag. If that tag happens to be unique, you can use the new tag filtering code to select a snapshot based on a tag, e.g. for restore or ls (combined with the snapshot ID latest):
Output of
restic version
Any
Expected behavior
We would like to see a new option called
--cid
(i.e Custom ID).When a backup succeeds, restic will use the
--cid
instead of computing one.It's the caller responsability to provide
Unique CID
with the same size as restic generated ones.In case of multiple paths to backup, the caller must provides the same number of CID:
Actual behavior
By default, restic generates its own
ID
(see first column below).Rational
As our backups grow more and more, we found ourselves managing 2 types of
IDs
.The ones generated by restic, and the ones stored in our legacy database.
Matching between them becomes hard and very cumbersome.
We would like to unify everything by using one, and only one
ID
.The text was updated successfully, but these errors were encountered: