Hacker News new | ask | show | jobs
by qwertox 610 days ago
`rsync` should have something like `.nosync` akin to `.nomedia`, and the directory should be added explicitly if one wants it to be synced. Or something like a `--profile` option where `.nosync` then can contain an allow/disallow filter for profiles.

I have the same issue with the scripts which trigger `rsync` getting confusingly complex because of all the include/exclude arguments.

2 comments

I've been using a .rsync-filter file for something like what you mean for ages for my homedirs backups. It's a bit tricky probably to make it right the first time but once it's there it just works.

https://manpages.debian.org/bookworm/rsync/rsync.1.en.html#f...

That's generally what the Cache Directory Specification attempts to cover: https://bford.info/cachedir/

Lots of things like the Rust tool chain now create the CACHEDIR.TAG files so that backup tools can ignore that part of the hierarchy. Alas, I believe the rsync folks refuse to implement it.