Rsync copy fails (“no such file or directory”)
up vote
1
down vote
favorite
This question has been asked here and there before, but I simply cannot find a solution that works for me.
I am just starting to learn how to use rsync, as I am desperately trying to copy files from one server to another.
I am using the following command:
rsync -avzP username@ip.address:/public_html/abc/ /www/abc
After entering the other server's password, I then get the following message:
stdin: is not a tty
receiving incremental file list
rsync: change_dir "/public_html/abc" failed: No such file or directory (2)
sent 8 bytes
received 101 bytes 8.72 bytes/sec total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [Receiver=3.1.1]
However, directory abc does exist, I can browse it etc. There are no spaces in the name.
Any ideas what this may be caused by? I'm pulling my hair out!
ssh directory rsync
|
show 2 more comments
up vote
1
down vote
favorite
This question has been asked here and there before, but I simply cannot find a solution that works for me.
I am just starting to learn how to use rsync, as I am desperately trying to copy files from one server to another.
I am using the following command:
rsync -avzP username@ip.address:/public_html/abc/ /www/abc
After entering the other server's password, I then get the following message:
stdin: is not a tty
receiving incremental file list
rsync: change_dir "/public_html/abc" failed: No such file or directory (2)
sent 8 bytes
received 101 bytes 8.72 bytes/sec total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [Receiver=3.1.1]
However, directory abc does exist, I can browse it etc. There are no spaces in the name.
Any ideas what this may be caused by? I'm pulling my hair out!
ssh directory rsync
Is/public_html
located off of the user/home
or/
or whatever default directory your ssh session will load you into? When you mean by browse to it do you mean via a web page or via command line once remote?
– kemotep
Jun 28 at 0:03
Is /abc a web server alias?
– Jeff Schaller
Jun 28 at 1:22
Looks like your shell might be spitting some odd output. Can you show the output ofssh username@ip.address ls -d /public_html/abc
? Especially if there is anything besides just the directory shown.
– BowlOfRed
Jun 28 at 3:17
Thanks for your comments, guys. @kemotep: yes, the folder is located off the user /home default directory. I can browse to it through ssh.
– killer_rabbit
Jun 28 at 6:07
@JeffSchaller: /abc is not an alias
– killer_rabbit
Jun 28 at 6:10
|
show 2 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
This question has been asked here and there before, but I simply cannot find a solution that works for me.
I am just starting to learn how to use rsync, as I am desperately trying to copy files from one server to another.
I am using the following command:
rsync -avzP username@ip.address:/public_html/abc/ /www/abc
After entering the other server's password, I then get the following message:
stdin: is not a tty
receiving incremental file list
rsync: change_dir "/public_html/abc" failed: No such file or directory (2)
sent 8 bytes
received 101 bytes 8.72 bytes/sec total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [Receiver=3.1.1]
However, directory abc does exist, I can browse it etc. There are no spaces in the name.
Any ideas what this may be caused by? I'm pulling my hair out!
ssh directory rsync
This question has been asked here and there before, but I simply cannot find a solution that works for me.
I am just starting to learn how to use rsync, as I am desperately trying to copy files from one server to another.
I am using the following command:
rsync -avzP username@ip.address:/public_html/abc/ /www/abc
After entering the other server's password, I then get the following message:
stdin: is not a tty
receiving incremental file list
rsync: change_dir "/public_html/abc" failed: No such file or directory (2)
sent 8 bytes
received 101 bytes 8.72 bytes/sec total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [Receiver=3.1.1]
However, directory abc does exist, I can browse it etc. There are no spaces in the name.
Any ideas what this may be caused by? I'm pulling my hair out!
ssh directory rsync
ssh directory rsync
asked Jun 27 at 23:36
killer_rabbit
82
82
Is/public_html
located off of the user/home
or/
or whatever default directory your ssh session will load you into? When you mean by browse to it do you mean via a web page or via command line once remote?
– kemotep
Jun 28 at 0:03
Is /abc a web server alias?
– Jeff Schaller
Jun 28 at 1:22
Looks like your shell might be spitting some odd output. Can you show the output ofssh username@ip.address ls -d /public_html/abc
? Especially if there is anything besides just the directory shown.
– BowlOfRed
Jun 28 at 3:17
Thanks for your comments, guys. @kemotep: yes, the folder is located off the user /home default directory. I can browse to it through ssh.
– killer_rabbit
Jun 28 at 6:07
@JeffSchaller: /abc is not an alias
– killer_rabbit
Jun 28 at 6:10
|
show 2 more comments
Is/public_html
located off of the user/home
or/
or whatever default directory your ssh session will load you into? When you mean by browse to it do you mean via a web page or via command line once remote?
– kemotep
Jun 28 at 0:03
Is /abc a web server alias?
– Jeff Schaller
Jun 28 at 1:22
Looks like your shell might be spitting some odd output. Can you show the output ofssh username@ip.address ls -d /public_html/abc
? Especially if there is anything besides just the directory shown.
– BowlOfRed
Jun 28 at 3:17
Thanks for your comments, guys. @kemotep: yes, the folder is located off the user /home default directory. I can browse to it through ssh.
– killer_rabbit
Jun 28 at 6:07
@JeffSchaller: /abc is not an alias
– killer_rabbit
Jun 28 at 6:10
Is
/public_html
located off of the user /home
or /
or whatever default directory your ssh session will load you into? When you mean by browse to it do you mean via a web page or via command line once remote?– kemotep
Jun 28 at 0:03
Is
/public_html
located off of the user /home
or /
or whatever default directory your ssh session will load you into? When you mean by browse to it do you mean via a web page or via command line once remote?– kemotep
Jun 28 at 0:03
Is /abc a web server alias?
– Jeff Schaller
Jun 28 at 1:22
Is /abc a web server alias?
– Jeff Schaller
Jun 28 at 1:22
Looks like your shell might be spitting some odd output. Can you show the output of
ssh username@ip.address ls -d /public_html/abc
? Especially if there is anything besides just the directory shown.– BowlOfRed
Jun 28 at 3:17
Looks like your shell might be spitting some odd output. Can you show the output of
ssh username@ip.address ls -d /public_html/abc
? Especially if there is anything besides just the directory shown.– BowlOfRed
Jun 28 at 3:17
Thanks for your comments, guys. @kemotep: yes, the folder is located off the user /home default directory. I can browse to it through ssh.
– killer_rabbit
Jun 28 at 6:07
Thanks for your comments, guys. @kemotep: yes, the folder is located off the user /home default directory. I can browse to it through ssh.
– killer_rabbit
Jun 28 at 6:07
@JeffSchaller: /abc is not an alias
– killer_rabbit
Jun 28 at 6:10
@JeffSchaller: /abc is not an alias
– killer_rabbit
Jun 28 at 6:10
|
show 2 more comments
3 Answers
3
active
oldest
votes
up vote
0
down vote
accepted
You need to add the connection details, eg. for SSH use --rsh=ssh
.
Try:
rsync -avzP --rsh=ssh username@ip.address:/public_html/abc/ /www/abc
And make sure the paths are correct. Are these paths absolute or relative: /public_html/abc/
, /www/abc
?
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
1
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be achdir
error.
– Kusalananda
Jun 28 at 6:59
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
add a comment |
up vote
4
down vote
The error comes from the fact that there is no /public_html/abc
directory on the remote system.
According to comments, the source directory is actually located in the user's home directory, not at the path /public_html
.
Therefore:
rsync -avzP username@ip.address:public_html/abc/ /www/abc
Here, we access public_html/abc
in the user's home directory rather than in the root of the filesystem.
The warning stdin: is not a tty
comes from the fact that your shell's startup file for interactive shells is being called on the remote host (your ~/.bashrc
file, if you are using bash
), and you are doing something in it that requires a terminal.
You may edit the shell startup file on the remote machine and insert the following close to the top:
[ ! -t 0 ] && return
This would stop the execution of e.g. ~/.bashrc
at that point for all shell sessions whose standard input streams are not attached to a terminal.
add a comment |
up vote
-1
down vote
First make sure the ssh user have a privilege write to this folder,
/www/abc
the run this command below
rsync -avzP -e ssh /www/abc user@destinationFolderPath
Note
- -v "verbose" (-vv will provide more detailed information)
- -e "ssh options" - specify the ssh as remote shell
- -a - "archive mode" - it preserves permissions (owners, groups), times, symbolic links, and devices
- -z compress file data during transfer
- -P show progress during transfer
CMIIW
1
1. The directory/www/abc
is local sossh
is irrelevant. 2. Yourrsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.
– roaima
Jun 28 at 7:51
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You need to add the connection details, eg. for SSH use --rsh=ssh
.
Try:
rsync -avzP --rsh=ssh username@ip.address:/public_html/abc/ /www/abc
And make sure the paths are correct. Are these paths absolute or relative: /public_html/abc/
, /www/abc
?
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
1
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be achdir
error.
– Kusalananda
Jun 28 at 6:59
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
add a comment |
up vote
0
down vote
accepted
You need to add the connection details, eg. for SSH use --rsh=ssh
.
Try:
rsync -avzP --rsh=ssh username@ip.address:/public_html/abc/ /www/abc
And make sure the paths are correct. Are these paths absolute or relative: /public_html/abc/
, /www/abc
?
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
1
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be achdir
error.
– Kusalananda
Jun 28 at 6:59
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You need to add the connection details, eg. for SSH use --rsh=ssh
.
Try:
rsync -avzP --rsh=ssh username@ip.address:/public_html/abc/ /www/abc
And make sure the paths are correct. Are these paths absolute or relative: /public_html/abc/
, /www/abc
?
You need to add the connection details, eg. for SSH use --rsh=ssh
.
Try:
rsync -avzP --rsh=ssh username@ip.address:/public_html/abc/ /www/abc
And make sure the paths are correct. Are these paths absolute or relative: /public_html/abc/
, /www/abc
?
answered Jun 27 at 23:59
Tomasz
8,79052863
8,79052863
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
1
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be achdir
error.
– Kusalananda
Jun 28 at 6:59
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
add a comment |
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
1
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be achdir
error.
– Kusalananda
Jun 28 at 6:59
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
Adding the connection details did the trick! And also one of the paths was not absolute. Thanks a bunch!
– killer_rabbit
Jun 28 at 6:29
1
1
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be a
chdir
error.– Kusalananda
Jun 28 at 6:59
Will due respect, but since this anwer doesn't even address the issue of the source directory not being found on the remote host, I'm wondering why it was accepted. The log in on the host works, or else there would not be a
chdir
error.– Kusalananda
Jun 28 at 6:59
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@killer_rabbit Kusulananda's answer is more to the point. You should accept it rather than mine.
– Tomasz
Jun 28 at 13:08
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
@Kusalananda I silently assumed the directories exist, but the paths are incorrect. I should have stated this assumption explicitly. (And present an alternative in case this assertion fails.)
– Tomasz
Jun 28 at 13:10
add a comment |
up vote
4
down vote
The error comes from the fact that there is no /public_html/abc
directory on the remote system.
According to comments, the source directory is actually located in the user's home directory, not at the path /public_html
.
Therefore:
rsync -avzP username@ip.address:public_html/abc/ /www/abc
Here, we access public_html/abc
in the user's home directory rather than in the root of the filesystem.
The warning stdin: is not a tty
comes from the fact that your shell's startup file for interactive shells is being called on the remote host (your ~/.bashrc
file, if you are using bash
), and you are doing something in it that requires a terminal.
You may edit the shell startup file on the remote machine and insert the following close to the top:
[ ! -t 0 ] && return
This would stop the execution of e.g. ~/.bashrc
at that point for all shell sessions whose standard input streams are not attached to a terminal.
add a comment |
up vote
4
down vote
The error comes from the fact that there is no /public_html/abc
directory on the remote system.
According to comments, the source directory is actually located in the user's home directory, not at the path /public_html
.
Therefore:
rsync -avzP username@ip.address:public_html/abc/ /www/abc
Here, we access public_html/abc
in the user's home directory rather than in the root of the filesystem.
The warning stdin: is not a tty
comes from the fact that your shell's startup file for interactive shells is being called on the remote host (your ~/.bashrc
file, if you are using bash
), and you are doing something in it that requires a terminal.
You may edit the shell startup file on the remote machine and insert the following close to the top:
[ ! -t 0 ] && return
This would stop the execution of e.g. ~/.bashrc
at that point for all shell sessions whose standard input streams are not attached to a terminal.
add a comment |
up vote
4
down vote
up vote
4
down vote
The error comes from the fact that there is no /public_html/abc
directory on the remote system.
According to comments, the source directory is actually located in the user's home directory, not at the path /public_html
.
Therefore:
rsync -avzP username@ip.address:public_html/abc/ /www/abc
Here, we access public_html/abc
in the user's home directory rather than in the root of the filesystem.
The warning stdin: is not a tty
comes from the fact that your shell's startup file for interactive shells is being called on the remote host (your ~/.bashrc
file, if you are using bash
), and you are doing something in it that requires a terminal.
You may edit the shell startup file on the remote machine and insert the following close to the top:
[ ! -t 0 ] && return
This would stop the execution of e.g. ~/.bashrc
at that point for all shell sessions whose standard input streams are not attached to a terminal.
The error comes from the fact that there is no /public_html/abc
directory on the remote system.
According to comments, the source directory is actually located in the user's home directory, not at the path /public_html
.
Therefore:
rsync -avzP username@ip.address:public_html/abc/ /www/abc
Here, we access public_html/abc
in the user's home directory rather than in the root of the filesystem.
The warning stdin: is not a tty
comes from the fact that your shell's startup file for interactive shells is being called on the remote host (your ~/.bashrc
file, if you are using bash
), and you are doing something in it that requires a terminal.
You may edit the shell startup file on the remote machine and insert the following close to the top:
[ ! -t 0 ] && return
This would stop the execution of e.g. ~/.bashrc
at that point for all shell sessions whose standard input streams are not attached to a terminal.
edited Jun 28 at 7:59
answered Jun 28 at 6:56
Kusalananda
118k16221360
118k16221360
add a comment |
add a comment |
up vote
-1
down vote
First make sure the ssh user have a privilege write to this folder,
/www/abc
the run this command below
rsync -avzP -e ssh /www/abc user@destinationFolderPath
Note
- -v "verbose" (-vv will provide more detailed information)
- -e "ssh options" - specify the ssh as remote shell
- -a - "archive mode" - it preserves permissions (owners, groups), times, symbolic links, and devices
- -z compress file data during transfer
- -P show progress during transfer
CMIIW
1
1. The directory/www/abc
is local sossh
is irrelevant. 2. Yourrsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.
– roaima
Jun 28 at 7:51
add a comment |
up vote
-1
down vote
First make sure the ssh user have a privilege write to this folder,
/www/abc
the run this command below
rsync -avzP -e ssh /www/abc user@destinationFolderPath
Note
- -v "verbose" (-vv will provide more detailed information)
- -e "ssh options" - specify the ssh as remote shell
- -a - "archive mode" - it preserves permissions (owners, groups), times, symbolic links, and devices
- -z compress file data during transfer
- -P show progress during transfer
CMIIW
1
1. The directory/www/abc
is local sossh
is irrelevant. 2. Yourrsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.
– roaima
Jun 28 at 7:51
add a comment |
up vote
-1
down vote
up vote
-1
down vote
First make sure the ssh user have a privilege write to this folder,
/www/abc
the run this command below
rsync -avzP -e ssh /www/abc user@destinationFolderPath
Note
- -v "verbose" (-vv will provide more detailed information)
- -e "ssh options" - specify the ssh as remote shell
- -a - "archive mode" - it preserves permissions (owners, groups), times, symbolic links, and devices
- -z compress file data during transfer
- -P show progress during transfer
CMIIW
First make sure the ssh user have a privilege write to this folder,
/www/abc
the run this command below
rsync -avzP -e ssh /www/abc user@destinationFolderPath
Note
- -v "verbose" (-vv will provide more detailed information)
- -e "ssh options" - specify the ssh as remote shell
- -a - "archive mode" - it preserves permissions (owners, groups), times, symbolic links, and devices
- -z compress file data during transfer
- -P show progress during transfer
CMIIW
edited Nov 26 at 3:41
answered Jun 28 at 5:22
Iyus Dedi Putra
12
12
1
1. The directory/www/abc
is local sossh
is irrelevant. 2. Yourrsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.
– roaima
Jun 28 at 7:51
add a comment |
1
1. The directory/www/abc
is local sossh
is irrelevant. 2. Yourrsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.
– roaima
Jun 28 at 7:51
1
1
1. The directory
/www/abc
is local so ssh
is irrelevant. 2. Your rsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.– roaima
Jun 28 at 7:51
1. The directory
/www/abc
is local so ssh
is irrelevant. 2. Your rsync
suggestion reverses the data flow to that which the OP wanted. 3. It's also syntactically incorrect for what you have described.– roaima
Jun 28 at 7:51
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452320%2frsync-copy-fails-no-such-file-or-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Is
/public_html
located off of the user/home
or/
or whatever default directory your ssh session will load you into? When you mean by browse to it do you mean via a web page or via command line once remote?– kemotep
Jun 28 at 0:03
Is /abc a web server alias?
– Jeff Schaller
Jun 28 at 1:22
Looks like your shell might be spitting some odd output. Can you show the output of
ssh username@ip.address ls -d /public_html/abc
? Especially if there is anything besides just the directory shown.– BowlOfRed
Jun 28 at 3:17
Thanks for your comments, guys. @kemotep: yes, the folder is located off the user /home default directory. I can browse to it through ssh.
– killer_rabbit
Jun 28 at 6:07
@JeffSchaller: /abc is not an alias
– killer_rabbit
Jun 28 at 6:10