tricky rsync setup quit working - Tools

This is a discussion on tricky rsync setup quit working - Tools ; Hi, some time ago I had started working on a rsync-based backup system. After I longer break; I now tried to continue this project but can't get it to work anymore. Maybe somebody here has any idea. The basic setup ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: tricky rsync setup quit working

  1. tricky rsync setup quit working

    Hi,

    some time ago I had started working on a rsync-based backup system.
    After I longer break; I now tried to continue this project but can't
    get it to work anymore. Maybe somebody here has any idea. The basic
    setup looks like this:

    client:
    $rsync $rsync_opts --rsh="'ssh -i $ssh_key'" $filesystems $bak_host::backup_module/path

    on the server side, the ssh key triggered a shell script that generated
    a configuration like

    [backup_module]
    path=/some/path
    use chroot=1
    ....

    and eventually invoked rsync with the command line:
    rsync --daemon --no-detach --config $cfg_file

    Back then, this setup actually worked: rsync read the configuration
    file and started its work using the ssh-tunneled network connection.
    In the syslog, this looked like this:
    rsyncd: connect from UNKNOWN (localhost)
    rsyncd: rsync to backup_module/hostname from UNKNOWN (localhost)
    ....
    Now the same setup just causes rsync to listen on a new network socket

    After looking through the documentation and digging in the rsync sources,
    it doesn't look like this could ever work, but thrust me - it did!
    (It looks like the only way to get rsync to honor the configuration file
    is to specify --daemon, which causes it to listen on the network instead
    of doing its work and the only way to do it's job on the existing network
    connection is to specify "--server", in which case it doesn't honor the
    configuration file. Unfortunately, some options like chroot can only be
    specified via configuration file)

    Unfortunately, I can't figure out what changed in the meantime that broke
    this setup, Does anybody have an idea?

    Any help would be greatly appreciated!

    Peter Daum

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  2. Re: tricky rsync setup quit working

    On Sat, 2008-09-13 at 15:14 +0200, Peter Daum wrote:
    > client:
    > $rsync $rsync_opts --rsh="'ssh -i $ssh_key'" $filesystems $bak_host::backup_module/path


    > and eventually invoked rsync with the command line:
    > rsync --daemon --no-detach --config $cfg_file


    > After looking through the documentation and digging in the rsync sources,
    > it doesn't look like this could ever work, but thrust me - it did!
    > (It looks like the only way to get rsync to honor the configuration file
    > is to specify --daemon, which causes it to listen on the network instead
    > of doing its work and the only way to do it's job on the existing network
    > connection is to specify "--server", in which case it doesn't honor the
    > configuration file. Unfortunately, some options like chroot can only be
    > specified via configuration file)


    To have rsync act as a daemon but use the existing connection, pass both
    --daemon and --server (as in the remote shell command sent by the
    client, which you can see with -vv). --daemon alone may have worked
    previously if rsync's stdin was a socket, which triggers an "inetd mode"
    similar to what happens if you also pass --server.

    Matt

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


+ Reply to Thread