Rsync copy fails ("no such file or directory")
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 [email protected]: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.
You need to add the connection details, eg. for SSH use --rsh=ssh
.
Try:
rsync -avzP --rsh=ssh [email protected]:/public_html/abc/ /www/abc
And make sure the paths are correct. Are these paths absolute or relative: /public_html/abc/
, /www/abc
?