Skip to content

Option for symlink dereference #1215

@cafuego

Description

@cafuego

A few of my backup repositories point at a 7 day rotating database dump directory. Each day, a dump of each database is written to /mnt/backup/database/YYYY/MM/DD/HH/II.

Originally I had restic backing up /mnt/backup/database, but that included 7 full copies of all data in each backup. Whilst redundancy is nice, this means a restore takes much longer than a restore of a single copy and there is seven times the data recovery and transfer charge.

I though I was smart by linking /mnt/backup/database/YYYY/MM/DD/HH/II to /mnt/backup/database/current, but in that scenario restic only backs up the symlink. Fast, but not helpful ;-)

I have a solution now that only backs up single copies of data by backing up /mnt/backup/database/current/* but that means a list of all database dumps is used by restic as the backup path. It also means that when I add or delete a database, the path changes and the expiry jobs see the snapshot with the different path as a new snapshot.

That leaves me with way more data stored offsite than is strictly necessary and thus a higher storage bill.

It would be wonderfully helpful if restic had an option to dereference symlinks, so I could point it at /mnt/backup/database/current and have it backup the contents of the directory that links points at.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions