I've made a simpler test:
freenas:~# cat /var/etc/rsyncd.conf
syslog facility = local4
list = no
port = 873
pid file = /var/run/rsyncd.pid
uid = rsync
[serveuranm]
comment = Sauvegarde du serveur ANM
path = /mnt/data/serveuranm/
list = true
max connections = 0
read only = false
uid = serveuranm
gid = rsync
post-xfer exec = echo RSYNC_HOST_NAME >& /var/log/timestamp.log
With this, I should see RSYNC_HOST_NAME on my timestamp.log after
rsync runs, no? But nothing happens. My log file still empty...
But with
post-xfer exec = echo RSYNC_HOST_NAME > /var/log/timestamp.log
It works! When I run rsync, RSYNC_HOST_NAME appears on timestamp.log!
So I deduct that rsync calls a sh shell and not tcsh (I only have
those on my box).
Then I tried with
post-xfer exec = /mnt/data/timestamp.sh $RSYNC_HOST_NAME > /var/log/
timestamp.log 2 >&1
It calls my script but without argument as I receive an error from my
script in the log:
Usage: /mnt/data/timestamp.sh <name_of_backuped_host>
But it's OK, from here I know what to do by myself. Thanks Matt, as
always pointing on the good direction. When I'll be big, I wanna be
like you ;)
Best regards,
Vitorio
--
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