trigger command on successful upload?
robert at roberthelmer.com
Tue Jun 15 18:56:12 GMT 2004
On Tue, Jun 15, 2004 at 10:22:14AM -0400, Tim Conway wrote:
> If you're rsyncing over an external transport, I can't imagine what the
> issue is in running a postprocessing command over the same transport. But,
> if what you're looking for is a way to do this over rsync internal
> transport, and want to get rid of the remote shell, perhaps for security
> reasons, leave a daemon, or perhaps a cron-driven script, to watch for the
> appearance of a trigger file. If the rsync transfer finishes correctly,
> you send up the trigger file, which is harvested by the receiver, which
> performs the desired post-transfer processing.
I would like to do it over the rsync internal transport, and not use SSH
for internal transfers anymore (too much overhead for the encryption).
I have considered using an approach like what you describe using the FAM
daemon (opensourced by SGI) but it occurred to me that making the rsync
client take something like this:
would eliminate the need for anything to be constantly running on
the frontend machine. This machine is being uploaded to, not downloaded
from, by rsync (it's impossible to know when the files on the backend
machine will be ready for download).
Not a big deal, just seems a bit more efficient this way, and less
setup on the frontend machines for me :) It is a potential security
problem, so I won't be surprised if people don't want it in the
mainstream rsync distribution.
> start pseudoscript:+++++++++++++++++++++++++++++++++++++++++++
> [ -f "$triggerfile" ] || exit 0
> rm $triggerfile
> perform whatever it is you wanted
> end pseudoscript:+++++++++++++++++++++++++++++++++++++++++++
> * * * * * /path/to/the/script
> Tim Conway
> Unix System Administration
> Contractor - IBM Global Services
> conway at us.ibm.com
> I would like to be able to trigger a script for #3 instead of having
> to ssh over (to make the frontend server a bit more autonomous, and
> simplify the process).
> Does this seem reasonable, or am I just making things more complex
> for myself? :)
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
More information about the rsync