Rsync --copy-dest issue

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Please help me to clarify my situation.



Remote (destination) server has a directory /data/data/ and includes 5 OLD files:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


Remote (destination) server has a directory /data/cache/data and includes 5 NEW files:



/data/cache/data/apu1.part1.rar
/data/cache/data/apu1.part2.rar
/data/cache/data/apu1.part3.rar
/data/cache/data/apu1.part4.rar
/data/cache/data/apu1.part5.rar


Local (source) host includes 5 NEW files with the same names:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


I try to use rsync with --copy-dest option not to transfer all NEW files but to use those from /data/cache/data directory.



Unfortunately, I have no success. New files can be used from /data/cache/data ONLY if I transfer files to the new empty directory.
Could someone help to make it working? I hope there is some needed key or option.



Rsync command:



rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data


Transfer log:



2018/03/02 17:10:46 .d..t...... data/
2018/03/02 17:10:46 <f..t...... data/apu1.part1.rar
2018/03/02 17:10:52 <f..t...... data/apu1.part2.rar
2018/03/02 17:10:58 <f..t...... data/apu1.part3.rar
2018/03/02 17:11:04 <f..t...... data/apu1.part4.rar
2018/03/02 17:11:09 <f.st...... data/apu1.part5.rar

Number of files: 6 (reg: 5, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 5
Total file size: 464610837 bytes
Total transferred file size: 464610837 bytes
Literal data: 378547797 bytes
Matched data: 86063040 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 377690932
Total bytes received: 333911

sent 377690932 bytes received 333911 bytes 13264029.58 bytes/sec
total size is 464610837 speedup is 1.23






share|improve this question






















  • I think you mean --copy-dest. Could you show what you're trying (all options) eg: rsync source dest --copy-dest oldsrc
    – couling
    Mar 7 at 12:09











  • rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data
    – Alexander Popov
    Mar 7 at 12:23










  • I'm wondering about two things... you are changing file permissions and I believe different file permissions cause files to be interpreted as different. Also you could try specifying --copy-dest ../cache instead of --copy-dest /data/cache. I'm not 100% certain how absolute paths work on remote hosts.
    – couling
    Mar 7 at 12:40











  • Absoulte paths work OK.
    – Alexander Popov
    Mar 7 at 13:08










  • Copydest works OK in case we try to upload files to the empty directory. If Rsync has to overwrite files, copydest is not working.
    – Alexander Popov
    Mar 7 at 13:10














up vote
0
down vote

favorite












Please help me to clarify my situation.



Remote (destination) server has a directory /data/data/ and includes 5 OLD files:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


Remote (destination) server has a directory /data/cache/data and includes 5 NEW files:



/data/cache/data/apu1.part1.rar
/data/cache/data/apu1.part2.rar
/data/cache/data/apu1.part3.rar
/data/cache/data/apu1.part4.rar
/data/cache/data/apu1.part5.rar


Local (source) host includes 5 NEW files with the same names:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


I try to use rsync with --copy-dest option not to transfer all NEW files but to use those from /data/cache/data directory.



Unfortunately, I have no success. New files can be used from /data/cache/data ONLY if I transfer files to the new empty directory.
Could someone help to make it working? I hope there is some needed key or option.



Rsync command:



rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data


Transfer log:



2018/03/02 17:10:46 .d..t...... data/
2018/03/02 17:10:46 <f..t...... data/apu1.part1.rar
2018/03/02 17:10:52 <f..t...... data/apu1.part2.rar
2018/03/02 17:10:58 <f..t...... data/apu1.part3.rar
2018/03/02 17:11:04 <f..t...... data/apu1.part4.rar
2018/03/02 17:11:09 <f.st...... data/apu1.part5.rar

Number of files: 6 (reg: 5, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 5
Total file size: 464610837 bytes
Total transferred file size: 464610837 bytes
Literal data: 378547797 bytes
Matched data: 86063040 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 377690932
Total bytes received: 333911

sent 377690932 bytes received 333911 bytes 13264029.58 bytes/sec
total size is 464610837 speedup is 1.23






share|improve this question






















  • I think you mean --copy-dest. Could you show what you're trying (all options) eg: rsync source dest --copy-dest oldsrc
    – couling
    Mar 7 at 12:09











  • rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data
    – Alexander Popov
    Mar 7 at 12:23










  • I'm wondering about two things... you are changing file permissions and I believe different file permissions cause files to be interpreted as different. Also you could try specifying --copy-dest ../cache instead of --copy-dest /data/cache. I'm not 100% certain how absolute paths work on remote hosts.
    – couling
    Mar 7 at 12:40











  • Absoulte paths work OK.
    – Alexander Popov
    Mar 7 at 13:08










  • Copydest works OK in case we try to upload files to the empty directory. If Rsync has to overwrite files, copydest is not working.
    – Alexander Popov
    Mar 7 at 13:10












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Please help me to clarify my situation.



Remote (destination) server has a directory /data/data/ and includes 5 OLD files:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


Remote (destination) server has a directory /data/cache/data and includes 5 NEW files:



/data/cache/data/apu1.part1.rar
/data/cache/data/apu1.part2.rar
/data/cache/data/apu1.part3.rar
/data/cache/data/apu1.part4.rar
/data/cache/data/apu1.part5.rar


Local (source) host includes 5 NEW files with the same names:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


I try to use rsync with --copy-dest option not to transfer all NEW files but to use those from /data/cache/data directory.



Unfortunately, I have no success. New files can be used from /data/cache/data ONLY if I transfer files to the new empty directory.
Could someone help to make it working? I hope there is some needed key or option.



Rsync command:



rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data


Transfer log:



2018/03/02 17:10:46 .d..t...... data/
2018/03/02 17:10:46 <f..t...... data/apu1.part1.rar
2018/03/02 17:10:52 <f..t...... data/apu1.part2.rar
2018/03/02 17:10:58 <f..t...... data/apu1.part3.rar
2018/03/02 17:11:04 <f..t...... data/apu1.part4.rar
2018/03/02 17:11:09 <f.st...... data/apu1.part5.rar

Number of files: 6 (reg: 5, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 5
Total file size: 464610837 bytes
Total transferred file size: 464610837 bytes
Literal data: 378547797 bytes
Matched data: 86063040 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 377690932
Total bytes received: 333911

sent 377690932 bytes received 333911 bytes 13264029.58 bytes/sec
total size is 464610837 speedup is 1.23






share|improve this question














Please help me to clarify my situation.



Remote (destination) server has a directory /data/data/ and includes 5 OLD files:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


Remote (destination) server has a directory /data/cache/data and includes 5 NEW files:



/data/cache/data/apu1.part1.rar
/data/cache/data/apu1.part2.rar
/data/cache/data/apu1.part3.rar
/data/cache/data/apu1.part4.rar
/data/cache/data/apu1.part5.rar


Local (source) host includes 5 NEW files with the same names:



data/apu1.part1.rar
data/apu1.part2.rar
data/apu1.part3.rar
data/apu1.part4.rar
data/apu1.part5.rar


I try to use rsync with --copy-dest option not to transfer all NEW files but to use those from /data/cache/data directory.



Unfortunately, I have no success. New files can be used from /data/cache/data ONLY if I transfer files to the new empty directory.
Could someone help to make it working? I hope there is some needed key or option.



Rsync command:



rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data


Transfer log:



2018/03/02 17:10:46 .d..t...... data/
2018/03/02 17:10:46 <f..t...... data/apu1.part1.rar
2018/03/02 17:10:52 <f..t...... data/apu1.part2.rar
2018/03/02 17:10:58 <f..t...... data/apu1.part3.rar
2018/03/02 17:11:04 <f..t...... data/apu1.part4.rar
2018/03/02 17:11:09 <f.st...... data/apu1.part5.rar

Number of files: 6 (reg: 5, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 5
Total file size: 464610837 bytes
Total transferred file size: 464610837 bytes
Literal data: 378547797 bytes
Matched data: 86063040 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 377690932
Total bytes received: 333911

sent 377690932 bytes received 333911 bytes 13264029.58 bytes/sec
total size is 464610837 speedup is 1.23








share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 13:08









couling

228210




228210










asked Mar 7 at 9:41









Alexander Popov

1




1











  • I think you mean --copy-dest. Could you show what you're trying (all options) eg: rsync source dest --copy-dest oldsrc
    – couling
    Mar 7 at 12:09











  • rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data
    – Alexander Popov
    Mar 7 at 12:23










  • I'm wondering about two things... you are changing file permissions and I believe different file permissions cause files to be interpreted as different. Also you could try specifying --copy-dest ../cache instead of --copy-dest /data/cache. I'm not 100% certain how absolute paths work on remote hosts.
    – couling
    Mar 7 at 12:40











  • Absoulte paths work OK.
    – Alexander Popov
    Mar 7 at 13:08










  • Copydest works OK in case we try to upload files to the empty directory. If Rsync has to overwrite files, copydest is not working.
    – Alexander Popov
    Mar 7 at 13:10
















  • I think you mean --copy-dest. Could you show what you're trying (all options) eg: rsync source dest --copy-dest oldsrc
    – couling
    Mar 7 at 12:09











  • rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data
    – Alexander Popov
    Mar 7 at 12:23










  • I'm wondering about two things... you are changing file permissions and I believe different file permissions cause files to be interpreted as different. Also you could try specifying --copy-dest ../cache instead of --copy-dest /data/cache. I'm not 100% certain how absolute paths work on remote hosts.
    – couling
    Mar 7 at 12:40











  • Absoulte paths work OK.
    – Alexander Popov
    Mar 7 at 13:08










  • Copydest works OK in case we try to upload files to the empty directory. If Rsync has to overwrite files, copydest is not working.
    – Alexander Popov
    Mar 7 at 13:10















I think you mean --copy-dest. Could you show what you're trying (all options) eg: rsync source dest --copy-dest oldsrc
– couling
Mar 7 at 12:09





I think you mean --copy-dest. Could you show what you're trying (all options) eg: rsync source dest --copy-dest oldsrc
– couling
Mar 7 at 12:09













rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data
– Alexander Popov
Mar 7 at 12:23




rsync -rlDi -z -t --no-h --out-format="%t %i %n %L" --copy-dest=/data/cache --stats --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r --delay-updates --partial --delete-after --force --ignore-errors /data/data root@l-rel-dnl.urg.avp.ru:/data
– Alexander Popov
Mar 7 at 12:23












I'm wondering about two things... you are changing file permissions and I believe different file permissions cause files to be interpreted as different. Also you could try specifying --copy-dest ../cache instead of --copy-dest /data/cache. I'm not 100% certain how absolute paths work on remote hosts.
– couling
Mar 7 at 12:40





I'm wondering about two things... you are changing file permissions and I believe different file permissions cause files to be interpreted as different. Also you could try specifying --copy-dest ../cache instead of --copy-dest /data/cache. I'm not 100% certain how absolute paths work on remote hosts.
– couling
Mar 7 at 12:40













Absoulte paths work OK.
– Alexander Popov
Mar 7 at 13:08




Absoulte paths work OK.
– Alexander Popov
Mar 7 at 13:08












Copydest works OK in case we try to upload files to the empty directory. If Rsync has to overwrite files, copydest is not working.
– Alexander Popov
Mar 7 at 13:10




Copydest works OK in case we try to upload files to the empty directory. If Rsync has to overwrite files, copydest is not working.
– Alexander Popov
Mar 7 at 13:10















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428704%2frsync-copy-dest-issue%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428704%2frsync-copy-dest-issue%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)