rsync as root + perl question
Not a programmer but thought this was more server than programming. But I am backing up several servers, or rather starting to setup a new backup due to the current one not working correctly.
I am looking to see how/why this is working, but the current script is run nightly as root, there is the following;
#!/usr/bin/perl
system("rsync -rlpogt --delete server::folder /folder/ > /root/rlog.txt 2>&1");
now this run's nightly, and works as root. Yet, if I say from server 1-> ssh server2 <enter> I am prompted for a root password.
I would love to re-write my script using bash (as I don't know perl), but my question is what or where is there some hidden security bypass to allow rsync to work, yet ssh doesn't (as I would always setup an ssh key between) but don't want to use root, but they are obviously rsyncing over successfully with no password!
##### Update:
As I continued reading, it seems to be that they are running the rsync deamon which looks like it listens and allows the connection, etc. so it seems to be that's the right path. I do need to look at how to config, allow, etc. but at least that looks like it is. Feel free to confirm, send .02 on setting it up, etc. but I do think that's it.
Thanks
Last edited by sir-lancealot; 02-14-2011 at 10:01 PM.
|