Saya ingin menyinkronkan Server1
dan Server2
mencatat LogServer
.
Untuk Server1
:
rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/
Yang ini berfungsi, tetapi untuk Server2
:
rsync -avz -e 'ssh -p 2188' user@server2:/usr/local/servers/logs/* /usr/local/logs/
Gagal:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: no such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: no such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: no such file or directory
rsync: getcwd(): No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at util.c(992) [sender=3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
Keduanya Server1
dan di Server2
-host di Amazon dengan versi yang sama rsync
.
Saya cukup yakin bahwa setiap direktori dalam perintah ada. Bagaimana saya bisa menyelesaikan masalah ini?
UPDATE: Saya sudah mencoba ssh -p 2188 user@server2 pwd
, dan tidak berhasil:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: no such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: no such file or directory
Tangkapan layar
ls -R /usr/local/servers
berfungsi tanpa kesalahan?