Je veux synchroniser Server1
et Server2
les journaux de LogServer
.
Pour Server1
:
rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/
Celui-ci fonctionne, mais pour Server2
:
rsync -avz -e 'ssh -p 2188' user@server2:/usr/local/servers/logs/* /usr/local/logs/
Il échoue:
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]
Les deux Server1
et Server2
est hébergé sur Amazon avec la même version de rsync
.
Je suis sûr que chaque répertoire de la commande existe. Comment puis-je résoudre ce problème?
MISE À JOUR: J'ai essayé ssh -p 2188 user@server2 pwd
, et cela ne fonctionne pas:
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
Capture d'écran
ls -R /usr/local/servers
fonctionne sans erreur?