Voglio sincronizzazione Server1
e Server2
's log a LogServer
.
Per Server1
:
rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/
Questo funziona, ma per Server2
:
rsync -avz -e 'ssh -p 2188' user@server2:/usr/local/servers/logs/* /usr/local/logs/
Non riesce:
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]
Entrambi Server1
ed Server2
è ospitato su Amazon con la stessa versione di rsync
.
Sono abbastanza sicuro che ogni directory nel comando esiste. Come posso risolvere questo problema?
AGGIORNAMENTO: ho provato ssh -p 2188 user@server2 pwd
e non funziona:
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
Immagine dello schermo
ls -R /usr/local/servers
funziona senza errori?