linuxmint / linuxmint/timeshift
Rsync snapshots forget local hardlinks
Nobody has claimed this yet.
- Dominant language
- Vala
- Stars
- 4.3k
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
While rsync hardlinks unchanged files with the previous snapshot, local hardlinks on the system appear to be lost.
This causes a significant amount of space to be wasted and could potentially result in some users being unable to restore past backups if they don't have enough space for the now duplicate files. It could also risk breaking programs that had expected to be working with hardlinked files. Finally when the user runs commands that create new directories containing thousands of hard linked files such as flatpak repair, timeshift will waste a lot of space and take significantly longer to back up as it's creating unnecessary new files.
To Reproduce
Steps to reproduce the behaviour:
- Create a file on the local system
- Create a hard link to that file
- Make an rsync snapshot
- Run
ls -ion the copy of both files within the snapshot
Expected behaviour
Both files in the snapshot should have the same inode number as they were originally hardlinked.
Observed behaviour
Both files instead have unique inode numbers.
Screenshots
System:
- Linux Distribution Name and Version: Kubuntu 25.10
- Desktop: KDE
- Timeshift Version: 24.06.6
- Timeshift Mode [btrfs/rsync?]: rsync
- Display Server: wayland
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by locating the rsync snapshot path and its handling of hard-linked files, reproduce the issue with the three-step inode check, and verify that unchanged local hardlinks retain one inode in the snapshot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100