(hmm, haven't seen the original message here yet)
On Thu 23 Oct 2008, Dave Howorth wrote:
> dfirth wrote:
> > I wish to email the Dirvish log file each time a vault is created to show me
> > how many new files were created. Dirvish log files are placed in new
> > directories named by the date and time they were created. How can I do this
> > when I do not know the path for the file?
> >
> > I tried adding an rsync option into master.conf i.e.
> > --log-file=/home/xxx/backup/log.txt . This worked but the log output in not
> > concise like the log in the dirvish directory. Instead it lists every sub
> > directory which makes the file very big and it is hard to find the files
> > that were actually changed.
> >
> > Thank you for any ideas.
From the dirvish manpage:
Each pre or post shell_commands will be run with these environment
variables DIRVISH_SERVER, DIRVISH_CLIENT, DIRVISH_SRC, DIRVISH_DEST and
DIRVISH_IMAGE set. The current directory will be DIRVISH_SRC on the
client and DIRVISH_DEST on the server. If there are any exclude
patterns defined the pre-server shell command will also have the
exclude file’s path in DIRVISH_EXCLUDE so it may read or modify the
exlude list.
Hence if you run your script as a post-server script, it has access to
$DIRVISH_DEST which should be the directory where the log file is, I
believe (you may need to experiment a bit to verify this).
Paul
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish