archiver: only store deviceID for hardlinks#4006
archiver: only store deviceID for hardlinks#4006MichaelEischer merged 6 commits intorestic:masterfrom
Conversation
|
This does make it impossible to determine where the mount points were from inspecting the snapshot... |
Is that information that useful? I figure that without knowing what filesystem was used where, that information is not particularly useful. I did some tests to see where hardlinks are used, so far I've seen usages in |
No, probably not. |
|
If I understand correctly, this small change could substantially improve the usability of This sounds like a very desirable improvement. @MichaelEischer Could you please clarify what is missing before we could potentially see this change merged? |
|
The problem with this change is that it will cause the next backup to create different tree blobs. This can double the size of the metadata stored for a backup. My plan is to add support for large directories in restic 0.18 (see https://forum.restic.net/t/roadmap-for-restic-0-17-to-0-19/7197) which will also require changes to the tree format. That provides a good opportunity to also include this PR. |
31c0eb0 to
9b9111d
Compare
|
Slight change of plans. Now that we have feature flags, we can immediately merge this PR, but hide it behind a feature flag for now ( |
9b9111d to
35e5c9d
Compare
The deviceID can change e.g. when backing up from filesystem snapshot. It is only used for hardlink detection. Thus there it is not necessary to store it for everything else.
0b7e154 to
a4624b7
Compare
a4624b7 to
21cf38f
Compare
68ab666 to
cf81f8c
Compare
|
Thank you @MichaelEischer this also fixed backing up from APFS-snapshots for me. |
|
I also just wanted to say thank you, this helped me a lot on my Mac. ❤️ |
What does this PR change? What problem does it solve?
he deviceID can change e.g. when backing up from a filesystem snapshot. However, it is only used for hardlink detection. Thus, it is not necessary to store it for non-hardlinks. This should handle most use cases without adding much complexity.
Was the change previously discussed in an issue or on the forum?
Solves part of #3041
Replaces #3599
Checklist
[ ] I have added documentation for relevant changes (in the manual).changelog/unreleased/that describes the changes for our users (see template).gofmton the code in all commits.