Sep 12, 2010
I have become convinced that rsync for CentOS 5 is broken. I'm trying to set up automatic backups between 2 servers in 2 different countries using rsync under CentOS 5.I can get manual backups to work between the 2 servers by doing two things I shouldn't need to do, but automatic backups fail and I see no solution.Here are the problems I am encountering: According to the instructions I've read everywhere, I am to set up two configuration files:
View 2 Replies
When I run rsync from root, it apparently just totally ignores these two files. No custom greeting, no log, no password used.
Even when I specify --password-file=/etc/rsyncd.secrets in the command line, it still ignores it. I am prompted and I must enter the password manually. Let me back up a moment. After first installing rsync, when I ran any command to access the root server, I get this error:
ssh: connect to host 188.8.131.52 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(463) [sender=2.6.8]
I read everywhere that rsync uses port 873, not port 22 which is used for SSH. Why is rsync on CentOS trying to use port 22?I have SSH switched from port 22 to another port (let's call it 5432 here) and block port 22.So, I have added this to the command line:
Then I get a connection ...
... but it prompts me for my password. It doesn't matter that I have my username and password, same one, in /etc/rsyncd.secrets on both servers. It still asks.And it rejects my password!The only way I can get it to connect is by creating an SSH user on the remote server for this.Even then, rsync STILL prompts me for a password, even though:
1. the username and password are specified in the /etc/rsyncd.secrets files on both servers
2. I've added the command line parameter --password-file=/etc/rsyncd.secrets Therefore, it is totally impossible to use an any cron job or other automatic synchronization, under CentOS 5.
rsync -av --password-file=/etc/rsyncd.secrets --rsh='ssh -p5432' sourcefiles* firstname.lastname@example.org:httpdocs/rsync
rsync -av --password-file=/etc/rsyncd.secrets --rsh='ssh -p5432' sourcefiles* 184.108.40.206:httpdocs/rsync
rsync -av --verbose --progress --stats --password-file=/etc/rsyncd.secrets --rsh='ssh -p5432' sourcefiles* email@example.com:httpdocs/rsync
Yes, I have made sure that I have the latest rsync. I have run yum update for everything.Yes, I have double checked, triple checked, and quadruple checked my config files.