On 8/2/19 7:23 AM, Carlos E. R. wrote:
On 02/08/2019 12.43, Dave Howorth wrote:
On Thu, 1 Aug 2019 23:59:38 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
I have:
OPTIONS="--archive --acls --xattrs --hard-links --sparse --stats --human-readable "
rsync $OPTIONS --password-file /root/cripta/keys/rsync.secrets \ --exclude=/lost+found --exclude=/dev --exclude=/sys --exclude=/proc --exclude=/run \ --exclude=/data --exclude=/mnt --exclude=/other --exclude=/media --exclude=/var/lib/samba/lock/ --exclude=/var/run/ \ --include=/data/storage_** \ / root@Isengard::MyBook_Telcontar/001
It is failing, /data/storage_** is not included.
Yes, the man page says that the first matching rule is acted upon, so the /data excludes everything below and your include rule is never considered.
If you put the include rule first, I think it may work.
Yes, that's what Andrei Borzenkov said, but it does not work, or I did another mistake.
I don't remember if you need to quote the patterns, BTW.
Apparently not on the include/exclude options. On the SOURCE part I tried once and got a syntax error.
This is what the process looks like now:
cer@Telcontar:~> ps afx | grep rsync 30526 pts/7 S+ 8:23 | | \_ rsync --archive --acls --xattrs --hard-links --sparse --stats --human-readable --password-file /root/cripta/keys/rsync.secrets --exclude=/lost+found --exclude=/dev --exclude=/sys --exclude=/proc --exclude=/run --exclude=/mnt --exclude=/other --exclude=/media --exclude=/var/lib/samba/lock/ --exclude=/var/run/ --include=/data/storage_** /data/vmware /data/cripta /data/storage_a /data/storage_b /data/storage_b02 /data/storage_c /data/storage_d /data/storage_e /data/storage_new_d /data/storage_old_b /data/storage_old_c root@Isengard::MyBook_Telcontar/001/data 32309 pts/50 S+ 0:00 | \_ grep --color=auto rsync
You can see that "--include=/data/storage_**" was not expanded. The command line I used is:
rsync $OPTIONS --password-file /root/cripta/keys/rsync.secrets \ --exclude=/lost+found --exclude=/dev --exclude=/sys --exclude=/proc --exclude=/run \ --exclude=/mnt --exclude=/other --exclude=/media --exclude=/var/lib/samba/lock/ --exclude=/var/run/ \ --include=/data/storage_** \
Change this to : --include=/data/storage_*/ ... I think you need the trailing '/' in order to traverse the subdirs. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org