rsync and running scripts - Tools

This is a discussion on rsync and running scripts - Tools ; I'm using the rsync protocol to keep a windows and linux system mirrored. I have set up the rsync and ssh to run properly, but I would like to know if there is an option, whether in the rsync command ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: rsync and running scripts

  1. rsync and running scripts


    I'm using the rsync protocol to keep a windows and linux system mirrored. I
    have set up the rsync and ssh to run properly, but I would like to know if
    there is an option, whether in the rsync command or placed in the
    rsyncd.conf file where I can call a script that runs each time rsync
    executes? The reason i need to do this is to change the groups/permissions
    of files when they are transferred over. I could just set this script to run
    every minute or so, but I would rather strive for accuracy by just having it
    run every time rsync completes a run through.
    --
    View this message in context: http://www.nabble.com/rsync-and-runn...p17765400.html
    Sent from the Samba - rsync mailing list archive at Nabble.com.

    --
    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: rsync and running scripts

    becca23 wrote:
    > I'm using the rsync protocol to keep a windows and linux system mirrored. I
    > have set up the rsync and ssh to run properly, but I would like to know if
    > there is an option, whether in the rsync command or placed in the
    > rsyncd.conf file where I can call a script that runs each time rsync
    > executes? The reason i need to do this is to change the groups/permissions
    > of files when they are transferred over. I could just set this script to run
    > every minute or so, but I would rather strive for accuracy by just having it
    > run every time rsync completes a run through.


    What about initiating the transfer on the receiving side ? This way - a
    script and a cron job (or some batch file and task scheduler, if it's on
    windows side) would do the thing nicely. Or if it must be sending side,
    just ssh remote command (script) to do any cleanup you might need after
    rsync transfer completes.
    --
    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


  3. Re: rsync and running scripts


    Would you do this using the ssh -s option? also, would this run the script
    before or after rsync completes?

    Michal Soltys-2 wrote:
    >
    > becca23 wrote:
    >> I'm using the rsync protocol to keep a windows and linux system mirrored.
    >> I
    >> have set up the rsync and ssh to run properly, but I would like to know
    >> if
    >> there is an option, whether in the rsync command or placed in the
    >> rsyncd.conf file where I can call a script that runs each time rsync
    >> executes? The reason i need to do this is to change the
    >> groups/permissions
    >> of files when they are transferred over. I could just set this script to
    >> run
    >> every minute or so, but I would rather strive for accuracy by just having
    >> it
    >> run every time rsync completes a run through.

    >
    > What about initiating the transfer on the receiving side ? This way - a
    > script and a cron job (or some batch file and task scheduler, if it's on
    > windows side) would do the thing nicely. Or if it must be sending side,
    > just ssh remote command (script) to do any cleanup you might need after
    > rsync transfer completes.
    > --
    > 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
    >
    >


    --
    View this message in context: http://www.nabble.com/rsync-and-runn...p17778067.html
    Sent from the Samba - rsync mailing list archive at Nabble.com.

    --
    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


  4. Re: rsync and running scripts

    becca23 wrote:
    > Would you do this using the ssh -s option?
    >


    Just regular command, like ssh admin@some.host.com 'ls -al /'

    > also, would this run the script before or after rsync completes?
    >


    That depends on your needs.
    --
    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


  5. Re: rsync and running scripts


    I really need it to run after rsync, how can I specify that?

    Michal Soltys-2 wrote:
    >
    > becca23 wrote:
    >> Would you do this using the ssh -s option?
    >>

    >
    > Just regular command, like ssh admin@some.host.com 'ls -al /'
    >
    >> also, would this run the script before or after rsync completes?
    >>

    >
    > That depends on your needs.
    > --
    > 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
    >
    >


    --
    View this message in context: http://www.nabble.com/rsync-and-runn...p17785703.html
    Sent from the Samba - rsync mailing list archive at Nabble.com.

    --
    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


  6. Re: rsync and running scripts

    On Tue, Jun 10, 2008 at 02:42:25PM -0700, becca23 wrote:
    > but I would like to know if there is an option, whether in the rsync
    > command or placed in the rsyncd.conf file where I can call a script
    > that runs each time rsync executes?


    See the "pre-xfer exec" and "post-xfer exec" daemon parameters (first
    added in 2.6.7):

    http://rsync.samba.org/ftp/rsync/rsyncd.conf.html

    ...wayne..
    --
    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