-
Notifications
You must be signed in to change notification settings - Fork 150
Added --match-relative-path option and support #640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
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. |
|
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. |
|
Was this finally added? I am interested in this feature. However, I have the last version and cannot see it implemented. Regards! |
3680f57 to
73bc74b
Compare
| g_assert(node_a); | ||
| g_assert(node_b); | ||
|
|
||
| diff = g_ascii_strcasecmp(node_a->basename, node_b->basename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that we use g_ascii_strcasecmp in rm_file_basenames_cmp but I think that its behaviour should be documented in the manpage as it has non-obvious consequences with today's UTF-8 filesystems (it is case-sensitive for non-ASCII characters) and with many other encodings it can create false-matches.
|
We should update the manpage and create tests for this. |
I've added
--match-relative-pathsupport for my own needs and seems there is an existing feature request for that: #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.