I'm trying to get rsync filters working -- and understood.
My current, simple test script is
----------------------------------------------
#!/bin/bash
ROPTS="--verbose --progress --itemize-changes \
--recursive \
--links \
--perms \
--times \
--group \
--owner \
--devices \
--specials \
--acls \
--xattrs \
--human-readable \
--numeric-ids \
--relative \
--delete-after \
--delete-excluded \
--iconv=UTF-8,UTF-8 \
"
/usr/bin/rsync ${ROPTS} --filter="merge /home/test.filter"
[email protected]:/ /home/TEST
----------------------------------------------
My 1st goal is to successfully filter to JUST backup "/boot", and all its
contents, give a SRC entry point of "/".
If I populate the filter file,
cat << EOF >> /home/test.filter
+ boot/
-sr /*
EOF
and exec the script, I end up with
ls -1 /home/TEST
boot/
du -h --max-depth=0 /home/TEST/boot/
32M /home/TEST/boot/
where the boot/ IS fully recursively populated with its files & subdir
contents.
So that works.
Next, I'd like to JUST backup two, specific subdirectories below /boot;
specifically /boot/grub & /boot/grub2.
Changing the filter If I add a file exclusion to the filter
cat << EOF >> /home/test.filter
+ boot/grub/
+ boot/grub2/
-sr /*
EOF
and re-exec the script, now, nothing is rsync'd -- no files or dirs are
transferred
Why doesn't the filter work for the subdirs?
How DO I filter to get just the subdirs of choice to rsync?
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html