scp to rsync conversion
The following is working as expected.
scp -o IdentityFile=/home/companyuser/.ssh/id_dsa_fner {} companyuser@14.140.100.189:/home/fner/
But the rsync version of the same command does not work:
rsync -av -o IdentityFile=/home/companyuser/.ssh/id_dsa_fner /home/companyuser/ companycuser@14.140.100.189:/home/fner/
I use find -exec >> scp to开发者_如何学JAVA copy files in the first example. I can copy all the files in one location. But rsync will allow me to have the same directory structure on destination exactly like master host.
you might try specifying the transfer type with -e
rsync -avze "ssh -o IdentityFile=/path/to/file" /sync/here/ root@remotehost:/to/here
精彩评论