On 02/08/2019 11.24, Per Jessen wrote:
Carlos E. R. wrote:
On Friday, 2019-08-02 at 10:23 +0200, Per Jessen wrote:
Carlos E. R. wrote:
The idea is to copy only some /data/* directories and avoid the rest. Or to not copy /data/** except /data/storage_**
Maybe this will do the job:
rsync $OPTIONS /data/storage_* /data/vmware \ root@Isengard::MyBook_Telcontar/$DESTINO
Certainly, that works. But that implies two separate runs:
One to copy the system: [snip] That is what I'm doing now. I want to combine the two runs in a single one.
Sorry, wasn't part of the spec, scope-creep :-)
I said or implied that from the start, but perhaps not clear enough.
I would just do two runs, but I understand the technical challenge.
There must be a filter to tell rsync to include /data/storage_* and exclude the rest of /data.
rsync -ax / /data/storage* --exclude=/data $DEST
Ah. Maybe. I'll try. Ah, no. The problem with that is that /data/storage_a ends in DEST/storage_a instead of DEST/data/storage_a Trying anyway. [...] Yes, does that. 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/ \ / /data/vmware root@Isengard::MyBook_Telcontar/$DESTINO I saw appear on destination, in seconds, DEST/vmware Then I tried sync $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/ \ / /data/vmware/ root@Isengard::MyBook_Telcontar/$DESTINO And this is worse, the contents of /data/vmware/ appears directly on $DEST without vmware directory. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)