is there anything special to do this from the daemon server. I've setup the /etc/rsyncd.conf with some filesystems and I would rather originate (control) my rsyncs from this server and not from the hosts that have the data I want. ie. I want to pull not push. for instance my rsyncd.conf [www] comment = www path = /snaps/www numeric ids = true log file = /snaps/rsync/logs/www.log pid file = /snaps/rsync/logs/www.pid list = true uid = root #post-xfer exec = do rolling zfs snapshot of the fs read only = false write only = false what should my rsync line look like in a cron or command line /usr/local/bin/rsync -axS --delete --stats servername:/var/www/ www ? thanks.
On Thu, 2009-09-10 at 08:42 -0500, Kevin Kramer wrote:> is there anything special to do this from the daemon server. I've setup > the /etc/rsyncd.conf with some filesystems and I would rather originate > (control) my rsyncs from this server and not from the hosts that have > the data I want. ie. I want to pull not push.Then you don't need to run an rsync daemon on the machine that will be collecting the data. Just have that machine run ordinary rsync client commands at the desired interval.> what should my rsync line look like in a cron or command line > > /usr/local/bin/rsync -axS --delete --stats servername:/var/www/ wwwIt looks like that command is trying to copy directly to the daemon. That would have to be written: /usr/local/bin/rsync -axS --delete --stats servername:/var/www/ localhost::www or: /usr/local/bin/rsync -axS --delete --stats servername:/var/www/ rsync://localhost/www But that's the case known as "two remote endpoints" (even though the daemon happens to be on the same machine), which the rsync client currently doesn't support. It needs one endpoint to be in the local filesystem. So you could bypass the daemon and do: /usr/local/bin/rsync -axS --delete --stats servername:/var/www/ /snaps/www The daemon options will need to be translated into appropriate options to, or scripting around, this rsync command. E.g., have a script that runs rsync with --numeric-ids and then your "post-xfer exec" command. -- Matt
> > is there anything special to do this from the daemon server. I've > setup > > the /etc/rsyncd.conf with some filesystems and I would rather > originate > > (control) my rsyncs from this server and not from the hosts that > have > > the data I want. ie. I want to pull not push. > > Then you don't need to run an rsync daemon on the machine that will be > collecting the data. Just have that machine run ordinary rsync client > commands at the desired interval. >If you are setting up a network based pull backup then you may be interested in looking at LBackup : <http://www.lucidsystems.org/tools/lbackup > LBackup is a wrapper backup system which uses rsync. The advantage of using a LBackup is that you will gain incremental backup trees. This is useful, should you need to retrieve a file from an old backup. The latest alpha-release of LBackup includes a command line tool which provides the ability to change directory though time. This means you can change directory up and down within the backup snapshot and also forward and backwards though time (between different backup snapshots) this can be handy if you are looking for when a file was deleted or added to a file system. Keep in mind that if you use LBackup to perform a network backup you will need to have an SSH server running on the machine you are which you are backing up. I hope this information is helpful to you.