This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Recursive substitution of existing files on receiver side

Synchronize files & directories to/from XigmaNAS with minimal data transfer.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
jpfmg
NewUser
NewUser
Posts: 1
Joined: 03 Mar 2015 08:55
Status: Offline

Recursive substitution of existing files on receiver side

Post by jpfmg »

Hello,

I have many files on the source side of the form:
here/cof_1.dat
here/cof_2.dat
here/cof_3.dat
...
...
here/tok_1.dat
here/tok_2.dat
here/tok_3.dat
...


I need to copy those into a directory structure that contains files with the same names. The files on this receiver side need to be updated.
The simplified structure on this side is as follows:
corpus/allwords/cof_1.dat
corpus/allwords/cof_1.dat
...
corpus/words/tok_1.dat
corpus/words/tok_2.dat
...


I tried the option -r for recursiveness with the rsync command, however, it seems that the recursion is only performed on the source side, but not on the receiver's side.

Please help me to find a way to sync the files without typing the whole structure for each sub-direcory between "/corpus/" and e.g. "/words/" (there are a few more in the non-simplified version).

Other options I used to do the synchronisation are -avh, --existing and --update, as in the following example that works, once I specify the whole path on the receiver's side.

Code: Select all

rsync -r -avh --update --existing receiver/here/ destination/corpus/ABC/DEF/words/
Actually, I just found out that this only works if the full path on the source side is specified as well.

Kind regards,
JPFMG

Post Reply

Return to “RSYNC”