• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved [Solved] rsync gave a bunch of errors...

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#1
I first tried the key/public_key, no luck, so now I am doing simpler transfer.

1. I setup the rsyncd.conf according to instructions
2. created identical users on each machine (server and client).
3. still it asked me for password, (supposed to be in a secret file) and gave me bunch of errors (ok, I changed the owner of the secret file, now only one error left)

Code:
> rsync -avz rsyncbee@drone::dronebackup /usr/home/rsyncbee
Password:
@ERROR: auth failed on module dronebackup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
here is the /usr/local/etc/rsyncd.conf file (I set them up identical on both client and server):

Code:
pid file = /var/run/rsyncd.pid
uid = rsync
gid = rsync
use chroot = no
max connections = 4
syslog facility = syslog
log file =/var/log/rsycd.log
auth users =rsyncbee
secrets file = /usr/local/etc/rsyncd.secrets

[dronebackup]
path = /usr/home/rsyncbee
comment = backup of drone www and mysql
on the client machine,
Code:
ssh rsyncbee@drone
Password:
>

works fine, so no password problem.

why it says "auth failed on module dronebackup"?

both machines are using freebsd 8.0-p2, rsync installed through ports today.

permission/ownership of /usr/local/etc/rsyncd related files:
Code:
-rw-r-----  1 rsyncbee  rsyncbee  914 Apr 20 19:02 rsyncd.conf
-rw-r-----  1 rsyncbee  rsyncbee   21 Apr 21 16:55 rsyncd.secrets
 

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#2
it seems that even though I specified a user on the command line (rsyncbee@drone) and also in the config file (auth users =rsyncbee
), the remote host is still thinking I am running as root (I tried to run as a non root, still get this message).

log on the host:
Code:
2010/04/21 20:36:56 [13679] connect from cell.xx  (1.2.3.4)
2010/04/21 20:37:00 [13679] secrets file must be owned by root when running as root (see strict modes)
2010/04/21 20:37:00 [13679] continuing without secrets file
2010/04/21 20:37:00 [13679] auth failed on module dronebackup from cell.xx (1.2.3.4): missing secret for user "rsyncbee"
 

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#3
now it is working! I had to change the UID to rsyncbee, since rsync was not in the /etc/group list. And change the owner and group to root:wheel for the secret file (strange).

but...still it is not supposed to ask me for a password...

Code:
rsync -avz rsyncbee@drone::dronebackup /usr/home/rsyncbee
Password:
receiving incremental file list
./
Backup_04.13.10-08.00.10_b156e4.sql.gz
Backup_04.14.10-08.01.36_d66e6a.sql.gz
Backup_04.15.10-08.00.56_20c2c0.sql.gz
Backup_04.17.10-03.26.48_4b0d81.sql.gz
Backup_04.19.10-16.55.45_4535d1.sql.gz
Backup_04.20.10-08.00.02_f11847.sql.gz
Backup_04.21.10-08.00.43_22b3d7.sql.gz

sent 201 bytes  received 9715136 bytes  1766424.91 bytes/sec
total size is 9715048  speedup is 1.00
 

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#4
ok, I got the public key working also. so now I can ssh to each other without a password.

but, how do I get to rsync to not ask me a password?

I tried the following, it still wants a password...and the user xxx's pass does not work.

Code:
rsync -avz -e "ssh -i /usr/home/xxx/.ssh/authorized_keys" xxx@cell:/usr/backup/rsyncbees /usr/backup/rsyncbees
 

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#5
I changed UID and GID and auth user all to xxx, who can ssh with no password...
but
Code:
rsync -avz drone::dronebackup /usr/home/xxx/test
still requires a password...if I do give it, then it works...but how do I get password less rsync? how can I can ssh fine?
 

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#6
finally works....
need to be the user xxx, not root.

Code:
rsync -avz drone:www /usr/backup/www
but the above command creats /usr/backup/www/www, with 2 wwws. not sure why....
 

beesatmsu

Well-Known Member

Thanks: 2
Messages: 251

#7
project done...got crontab to work...so one server get a copy of the tar files and mysql dump from the main server.

the correct code for the above job is rsync -avz drone:www /usr/backup/ which will automatically update the client dir /usr/backup/www with host files under /usr/home/xxx/www
 
Top