I'm wrestling with include/exclude rules and not finding a way to do this: Simplified command: rsync -avv --exclcude-from=rsync_exclude \ ~/ /dest/ Backup ~/ including ~/.kde3.5/share/apps/konqueror/bookmarks.xml but excluding everything else under ~/.kde3.5 Here are some of what hasn't worked in an EXCLUDE file. + /.kde3.5/share/apps/konqueror/bookmarks.xml /.kde3.5/ + .kde3.5/share/apps/konqueror/bookmarks.xml /.kde3.5** + .kde3.5/share/apps/konqueror/bookmarks.xml .kde3.5/ There are a number of other combos I've tried but still not getting the results I want. The coverage in `man rsync' seems too general to get a working example of doing this.
Harry Putnam <reader@newsguy.com> writes:> Here are some of what hasn't worked in an EXCLUDE file. > > + /.kde3.5/share/apps/konqueror/bookmarks.xml > /.kde3.5/ > > + .kde3.5/share/apps/konqueror/bookmarks.xml > /.kde3.5** > > + .kde3.5/share/apps/konqueror/bookmarks.xml > .kde3.5/ > > There are a number of other combos I've tried but still not getting > the results I want. > > The coverage in `man rsync' seems too general to get a working example > of doing this.That last bit about the manual being too general was wrong. It does include an example that let me find the solution but first one more failure should be listed. This fails: + /.kde3.5/share/ + /.kde3.5/share/apps/ + /.kde3.5/share/apps/konqueror/ + /.kde3.5/share/apps/konqueror/bookmarks.xml - /.kde3.5/* However using a double asterisk makes it all work: + /.kde3.5/share/ + /.kde3.5/share/apps/ + /.kde3.5/share/apps/konqueror/ + /.kde3.5/share/apps/konqueror/bookmarks.xml - /.kde3.5/* Moves only the bookmarks file Still it seems there would be a more succinct way...