Chris Green
2024-Jul-16 15:00 UTC
A question about rsync filters, not sure if I understand the man page
I run a daily backup using 'rsync -a -F ....' I want to exclude everything in ~/.local/share **except** the file:- /home/chris/.local/share/evolution/calendar/system/calendar.ics I have the following in my rsync-filter file to exclude ~/.local/share - .local/share Can I simply add the following before the exclude line:- + /home/chris/.local/share/evolution/calendar/system/calendar.ics It's not quite clear (to me anyway) if this will work or do I have to somehow add something further to allow the calendar.ics file to be found? It's the following bit that **seems** to be saying the above won't work:- It is also important to understand that the include/exclude rules are applied to every file and directory that the sender is recursing into. Thus, if you want a particular deep file to be included, you have to make sure that none of the directories that must be traversed on the way down to that file are excluded or else the file will never be discovered to be included. As an example, if the directory "a/path" was given as a transfer argument and you want to ensure that the file "a/path/down/deep/wanted.txt" is a part of the transfer, then the sender must not exclude the directories "a/path", "a/path/down", or "a/path/down/deep" as it makes it way scanning through the file tree. -- Chris Green
Francis.Montagnac at inria.fr
2024-Jul-16 15:56 UTC
A question about rsync filters, not sure if I understand the man page
Hi. On Tue, 16 Jul 2024 16:00:47 +0100 Chris Green via rsync wrote:> I run a daily backup using 'rsync -a -F ....'> I want to exclude everything in ~/.local/share **except** the file:-> /home/chris/.local/share/evolution/calendar/system/calendar.ics> I have the following in my rsync-filter file to exclude ~/.local/share> - .local/share> Can I simply add the following before the exclude line:-> + /home/chris/.local/share/evolution/calendar/system/calendar.icsNo. Assuming you are doing this backup from your homedir, you should add to your .rsync-filter file: + /.local/ + /.local/share/ + /.local/share/evolution/ + /.local/share/evolution/calendar/ + /.local/share/evolution/calendar/system/ + /.local/share/evolution/calendar/system/calendar.ics - /.local/share/** The leading / does not means the / of the machine, but the root of the transfer (assuming this is your homedir). -- francis
Apparently Analagous Threads
- A question about rsync filters, not sure if I understand the man page
- A question about rsync filters, not sure if I understand the man page
- Help with correct text file syntax EXCLUDE/INCLUDE + OPTION
- Still stuck with exculsion text file pattern
- res_calendar / ownCloud