trying to do a backup
I have created ssh keys and I could login with no passwd form client to server and other around,
so my question is I am trying to do backup such as /etc just for a test with rsync and i am using this command sudo rsync -e 'ssh -x' -avz hostname:/etc /home/paxmaster/testing/backup/ but the problem is why its asking me password if i have created ssh-keys I can login with password if i do it with regular way such as ssh ipadress anybody could help me, it would be great thanks |
When you are using sudo, you are running as root. You will need to create and exchange the key under the root account.
|
I have too think outside of the box, now on thx
and my other questions is how would I compare two different dir, since i did the backup i want to know if the two dir is the same, but the problem i want to compare from two different remote location, how would i do that. thx |
Well, that's rsync's job; to compare the source and destination, and send any differences.
If you want to verify that rsync is doing what you expect, you can: ssh userid@remotehost ls -lR directory/ > remotedir.txt and compare the file attributes against the local filesystem. |
All times are GMT -5. The time now is 04:41 PM. |