Skip to content

RSYNC mode recursively backs up its own previous snapshots when /run isn't excluded #557

Description

@jamjop

Originally reported at teejee2008/timeshift#312 (2018) — that repo is now archived/locked so filing fresh here since it's still reproducible on current Timeshift.

Description:
In RSYNC mode, each snapshot run mounts the backup device under /run/timeshift/<pid>/backup/. If /run isn't in the exclude list, the next snapshot run's rsync pass recursively captures that live mount point — meaning it captures all previously retained snapshots nested inside the new one. This compounds every cycle (hourly/daily/weekly/monthly), since each new snapshot re-includes everncmore previous snapshots.

The stock default exclude list does include /run/*, so this doesn't show up out of the box. But it's very easy to silently reintroduce: customizing the exclude list for your own paths (extra mounts, app directories, etc.) without realizing it needs to also preserve the stock /run entry drops this protection with no warning.

Impact observed:
19 retained snapshots (well within configured retention counts — 6 hourly / 4 daily / 3 weekly / 2 monthly / 5 boot, nothing over-retained or abandoned) had ballooned to 561GB, on a system where the actual root filesystem is only ~309GB used. A single snapshot's /var/run (symlinked to /run) alone was 438GB — almost entirely nested copies of earlier snapshots.

Suggested fix:
Since Timeshift already knows its own live mount path for the current run, it could defensively exclude that specific path unconditionally at runtime, rather than relying solely on a default exclude entry that any legitimate user customization can accidentally drop.

Workaround: add /run/*** back to the exclude list explicitly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions