rmlint icon indicating copy to clipboard operation
rmlint copied to clipboard

Added --match-relative-path option and support

Open ttyusupov opened this issue 9 months ago • 2 comments

I've added --match-relative-path support for my own needs and seems there is an existing feature request for that: https://github.com/sahib/rmlint/issues/550.

In my case it was useful to only keep files that have been changed in different backup snapshots and keep files which have different relative paths (and different content than file with the same relative path in original copy) although the same content as some file in original copy.

ttyusupov avatar Nov 12 '23 19:11 ttyusupov

How are you making these backups? Typically this is something that is done with rsync (which can copy only files that have changed relative to a previous backup with --compare-dest) or with lightweight snapshots (e.g. btrfs snapshots are free because of reflinks and deleting files does not usually reduce disk usage). Making a full copy of an entire hierarchy only to delete most of it seems inefficient.

cebtenzzre avatar Nov 12 '23 21:11 cebtenzzre

These were old backups on external drive made by TimeMachine which I needed to save somewhere else. Due to some reasons some files in snapshots were copies with exactly the same content rather than hardlinks.

Another potential scenario is when you already have a full copy on external drive but then realize you only want to keep old versions of changed files because you have a new backup on another drive.

ttyusupov avatar Nov 12 '23 22:11 ttyusupov