On 04/08/2019 14.22, Per Jessen wrote:
Carlos E. R. wrote:
The shell expands to:
Telcontar:~ # ps afxu | grep rsync root 30750 20.2 0.0 68284 7948 pts/7 S+ 12:52 0:12 | | \_ rsync --archive --acls --xattrs --hard-links --sparse --stats --human-readable --password-file /root/cripta/keys/rsync.secrets --link-dest=root@Isengard::MyBook_Telcontar/001 --relative --include /data//data/vmware** --include=/data/storage_** --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/002 root 30794 0.0 0.0 7432 888 pts/50 S+ 12:53 0:00 | \_ grep --color=auto rsync Telcontar:~ #
You can see the asterisks on "--include=..." are not expanded.
Which they surely should be, unless quoted or escaped.
But they are not quoted nor escaped - you can see the exact command line I used in the previous post. The reason is, I understand, that bash knows it is an --option in the command line, not a parameter, which do get expanded. Look, pasted from another post, two days ago: ]> 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_** \ ]> /data/vmware /data/cripta /data/storage_** root@Isengard::MyBook_Telcontar/$DESTINO/data Notice how the parameters (last line) did get expanded by bash, but not the --options.
Also, the cpu load on the server rsyncd gets limited to 85%, as seen by "top", after the systemd trick I mentioned in another post.
It's really just a cgroup, it's a neat and easy way to use it.
Indeed it is.
So, it is working except for the --link-dest thing - which is crucial to me, but is another issue. If that doesn't work, I'll have to use btrfs snapshots somehow.
Or use two rsyncs ...
I don't see how that will help to create the hard links to the old backup copy. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)