Connecting two rsync clients

George Hazlewood george at layer1.co.uk
Tue Feb 11 00:47:02 EST 2003


Aologies for filling up everyone's mailboxes, quite typically I've
managed to fix my own problem.  The error I was getting was coming from
the shell script and namely the fact that rsync doesn't like the \
newlines.  I've got the two clients working perfectly.

Once again apologies for wasting time...

Cheers

George

George Hazlewood wrote:
> Hi,
> 
> Firstly a quick intro, I'm a web developer/linux admin who's trying to 
> setup automated backups for a client.  I really like the look of rsync 
> and I know it'll do what I want if I can get it to ;)
> 
> I've spent some time playing with rsync trying to get it to do what I 
> want but I keep getting stumped.  The situation is simple, webserver 
> (master) with various files that need backing up (usual config files, a 
> tar of the dbs on the machine, and all the html gubbins).  The 
> destination machine, a remote (i.e. off network, backup) machine which I 
> have shell access to which is purely used for backups.  I want to set 
> rsync to run from cron daily to backup any changed files to the remote 
> machine so that should anything disasterous happen, e.g. client 
> stupidity, I can recover files.
> 
> I'd assumed after reading the docs that I would be able to do a 
> client->client backup.  I don't have access to setup rsyncd on the 
> remote machine so I tried connecting two clients.  Am I correct in 
> trying this?  All the work is done from the master machine (running the 
> rsync client from cron) and files to backup are pushed at the backup 
> machine.  That's what I thought anyway.  I tried using the following 
> shell to make things easier to change and run.
> 
> <snip>
> 
> /usr/local/bin/rsync -vcrlnptgoxRz --delete -e ssh \
> --include-from=/usr/local/rsync/include.conf \
> --exclude-from=/usr/local/rsync/exclude.conf --stats --progress \
> /etc/httpd/conf/httpd.conf \
> /home/bind/etc/ \
> /usr/local/mysql_backup/currentbackup.tar.gz \
> /home/httpd/hosts \
> /etc/opt/awstats /var/cache/awstats \
>  george@<remotemachinehere>.com:/home/george/backup/
> 
> </snip>
> 
> And running that gets this:
> 
> building file list ...
> xxx files to consider
> ERROR: destination must be a directory when copying more than 1 file
> rsync error: errors selecting input/output files, dirs (code 3) at 
> main.c(274)
> rsync: connection unexpectedly closed (8 bytes read so far)
> rsync error: error in rsync protocol data stream (code 12) at io.c(150)
> ./rsync.sh: george@<remotemachinehere>.com:/home/george/backup/: No such 
> file or directory
> 
> 
> Assuming that client to client doesn't work can I do server->client 
> where the client pulls the data from the server (on the master machine)?
> 
> I think I've confused myself too much, I've been trying to do it in a 
> hurry which is never good.
> 
> Can anyone help explain where I'm going wrong please?
> 
> Thanks in advance
> 
> George
> 
> 
> 


-- 
Layer1
http://www.layer1.co.uk
t: +44 (20) 8567 5923 m: +44 (7801) 945164






More information about the rsync mailing list