LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   trying to do a backup (https://www.linuxquestions.org/questions/linux-general-1/trying-to-do-a-backup-325208/)

Paxmaster 05-19-2005 09:23 PM

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

macemoneta 05-20-2005 07:46 PM

When you are using sudo, you are running as root. You will need to create and exchange the key under the root account.

Paxmaster 05-21-2005 03:03 PM

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

macemoneta 05-21-2005 03:16 PM

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.