-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.2.21.1908020957180.5907@Telcontar.valinor> On Friday, 2019-08-02 at 06:48 +0300, Andrei Borzenkov wrote:
02.08.2019 0:59, Carlos E. R. пишет:
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.
Filters are in ordered list, the first matching filter applies. --include=/data/subdir needs to be before --exclude=/data
Oh! That's reverse order to me :-) [... trying ...] Nope (took 9 minutes to run) rsync $OPTIONS --password-file /root/cripta/keys/rsync.secrets \ --include=/data/storage_** --include=/data/vmware \ --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/ \ / root@Isengard::MyBook_Telcontar/$DESTINO The idea is to copy only some /data/* directories and avoid the rest. Or to not copy /data/** except /data/storage_** The above command copies none of the /data tree. - -- Cheers, Carlos E. R. (from openSUSE 15.0 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXUPtVxwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVDKMAn3olylWhSNsQlxWTX4+n WWEOibU3AJ9iZxCLucd77iRcoRfkYXntWQ56jA== =zBNZ -----END PGP SIGNATURE-----