linuxmint / linuxmint/timeshift

Rsync snapshots forget local hardlinks

Open
#542 1 comment 0 reactions 0 assignees View on GitHub

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:

  1. Create a file on the local system
  2. Create a hard link to that file
  3. Make an rsync snapshot
  4. Run ls -i on 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
Local flatpak size
Flatpak size on snapshot

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.