2 ms·
Once I found the rsync --relative (-R) command mode and its /./ meta syntax, I no longer appreciated this trailing slash feature as a good idea on its own. Whe
by saltcured 5y ago
Once I found the rsync --relative (-R) command mode and its /./ meta syntax, I no longer appreciated this trailing slash feature as a good idea on its own.
When you are worrying about idempotent re-sync of trees, I think it is so much more important to think about where the roots of the synchronization should match up between local and remote, and to make that explicit in the calling convention.
rsync -Ra /src-only/./{a,b,c} remote:/remote-only/./
I also think you should be writing this idempotent call in a script to presumably be reused over time, and this helps document the goal.
- mhalle 5y agoI didn't know about this meta-syntax, thanks - it looks very useful. I would have to think about how it fits in with the philosophy of the trailing slash sometime, but I don't want to hurt my head right now.