-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for hard links. #16
Comments
Proper full snapshot restore + preserve hardlinks is important, otherwise restored data may suddenly take up MUCH MORE space than expected. Also it's an optimization: you don't need to download/create/write file again, just create hardlink to existing one (if it's in the same snapshot). |
I tried to dig a bit into this topic. Indeed it seems that the only way to detect hard links within a filesystem is to check the number of links and compare inodes - exactly what restic is doing within their restore. Now there are the following issues:
|
In some cases restoring hardlinks is important, e.g. there is a lot of large hardlinked files, but device space is limited. Real live example: macos Time Machine |
Hi @aawsome ! Any updates on this? |
rustic currently saves the file # of links, as restic does. Other support for hard links is missing.
Restic uses the information of # of links and more (like device id) to (try to) restore hard links during restore. This so far only works for files within the restore and poses other problems, see restic/restic#3041 (comment).
Correct treatment of hard links during backup and restore is hard, but should be better supported. For instance:
backup
.restore
to suit user's needs for restoring hard links.The text was updated successfully, but these errors were encountered: