rsync not working











up vote
0
down vote

favorite












How do I exclude a folder when using rsync ?



rsync -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/


And this is the message I got. But I went into the server and did not see the copied file.



skipping directory .
<f..T...... id_rsantu


I included --exclude= but it is still copying from /media/kong/Elements/sgan/dataset/ because I see



<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012818.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012819.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012820.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012821.png









share|improve this question
























  • The syntax is --exclude=PATTERN, you missed an = there
    – Jos
    Nov 29 at 11:23















up vote
0
down vote

favorite












How do I exclude a folder when using rsync ?



rsync -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/


And this is the message I got. But I went into the server and did not see the copied file.



skipping directory .
<f..T...... id_rsantu


I included --exclude= but it is still copying from /media/kong/Elements/sgan/dataset/ because I see



<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012818.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012819.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012820.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012821.png









share|improve this question
























  • The syntax is --exclude=PATTERN, you missed an = there
    – Jos
    Nov 29 at 11:23













up vote
0
down vote

favorite









up vote
0
down vote

favorite











How do I exclude a folder when using rsync ?



rsync -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/


And this is the message I got. But I went into the server and did not see the copied file.



skipping directory .
<f..T...... id_rsantu


I included --exclude= but it is still copying from /media/kong/Elements/sgan/dataset/ because I see



<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012818.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012819.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012820.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012821.png









share|improve this question















How do I exclude a folder when using rsync ?



rsync -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/


And this is the message I got. But I went into the server and did not see the copied file.



skipping directory .
<f..T...... id_rsantu


I included --exclude= but it is still copying from /media/kong/Elements/sgan/dataset/ because I see



<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012818.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012819.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012820.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012821.png






rsync






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 29 at 11:27

























asked Nov 29 at 11:19









Kong

2841618




2841618












  • The syntax is --exclude=PATTERN, you missed an = there
    – Jos
    Nov 29 at 11:23


















  • The syntax is --exclude=PATTERN, you missed an = there
    – Jos
    Nov 29 at 11:23
















The syntax is --exclude=PATTERN, you missed an = there
– Jos
Nov 29 at 11:23




The syntax is --exclude=PATTERN, you missed an = there
– Jos
Nov 29 at 11:23










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










you need to use -r flag:

rsync -r -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/



from man rsync:

-r, --recursive recurse into directories






share|improve this answer





















  • but its still copying stuff from /media/kong/Elements/sgan/dataset/
    – Kong
    Nov 29 at 11:25






  • 1




    that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
    – janmyszkier
    Nov 29 at 11:27










  • thank you very much !
    – Kong
    Nov 29 at 11:29











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097085%2frsync-not-working%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










you need to use -r flag:

rsync -r -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/



from man rsync:

-r, --recursive recurse into directories






share|improve this answer





















  • but its still copying stuff from /media/kong/Elements/sgan/dataset/
    – Kong
    Nov 29 at 11:25






  • 1




    that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
    – janmyszkier
    Nov 29 at 11:27










  • thank you very much !
    – Kong
    Nov 29 at 11:29















up vote
1
down vote



accepted










you need to use -r flag:

rsync -r -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/



from man rsync:

-r, --recursive recurse into directories






share|improve this answer





















  • but its still copying stuff from /media/kong/Elements/sgan/dataset/
    – Kong
    Nov 29 at 11:25






  • 1




    that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
    – janmyszkier
    Nov 29 at 11:27










  • thank you very much !
    – Kong
    Nov 29 at 11:29













up vote
1
down vote



accepted







up vote
1
down vote



accepted






you need to use -r flag:

rsync -r -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/



from man rsync:

-r, --recursive recurse into directories






share|improve this answer












you need to use -r flag:

rsync -r -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/



from man rsync:

-r, --recursive recurse into directories







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 29 at 11:22









janmyszkier

50827




50827












  • but its still copying stuff from /media/kong/Elements/sgan/dataset/
    – Kong
    Nov 29 at 11:25






  • 1




    that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
    – janmyszkier
    Nov 29 at 11:27










  • thank you very much !
    – Kong
    Nov 29 at 11:29


















  • but its still copying stuff from /media/kong/Elements/sgan/dataset/
    – Kong
    Nov 29 at 11:25






  • 1




    that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
    – janmyszkier
    Nov 29 at 11:27










  • thank you very much !
    – Kong
    Nov 29 at 11:29
















but its still copying stuff from /media/kong/Elements/sgan/dataset/
– Kong
Nov 29 at 11:25




but its still copying stuff from /media/kong/Elements/sgan/dataset/
– Kong
Nov 29 at 11:25




1




1




that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
– janmyszkier
Nov 29 at 11:27




that's becasue your exclude should only include path of the copied path: --exclude dataset/ because /media/kong/Elements/sgan is where the sync starts
– janmyszkier
Nov 29 at 11:27












thank you very much !
– Kong
Nov 29 at 11:29




thank you very much !
– Kong
Nov 29 at 11:29


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097085%2frsync-not-working%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido