John Rouillard wrote at about 20:57:48 +0000 on Tuesday, February 24, 2009:
> On Tue, Feb 24, 2009 at 03:17:43PM -0500, Jeffrey J. Kosowsky wrote:
> > John Rouillard wrote at about 20:07:04 +0000 on Tuesday, February 24, 2009:
> > > On Sun, Feb 22, 2009 at 02:47:52PM -0800, Craig Barratt wrote:
> > > > James writes:
> > > > > I made a script with the following contents as a test and named
> > > > > it startbkpemail.sh (just used the example name from the post)
> > > > > and added the a line '/usr/local/bin/startbkpemail.sh $host
> > > > > $type'; in the DumpPreUserCmd field in the host config - but
> > > > > it is not executing it. Any suggestions? The permissions on the
> > > > > file are 777 for testing so I know that is not the problem.
> > > >
> > > > Is there any error message in the XferLOG file? Does it say it is
> > > > executive your DumpPreUserCmd?
> > >
> > > I was also working with DumpPreUserCmd and having errors when
> > > executing it (I was editing the config.pl file directory and using "
> > > not ' so the variable arguments weren't being passed in
> > > correctly). The script was generating stdout and stderr output, but I
> > > never saw an XferLOG link in the web interface or a non-zero length
> > > xferlog in the filesystem for the dump. There seems to be a problem in
> > > 3.1.0 where the xferlog is not written or preserved if the
> > > DumpPreUserCmd exits with a non-zero exit code.
> >
> > I must be missing something, because I would think that the behavior
> > you describe is normal. If DumpPreUserCmd returns an error, then the
> > backup never starts so you don't get an XferLOG file - am I missing
> > something obvious here?
>
> Well yes and no. I agree it could be considered reasonable, but where
> does the error from the DumpPreUserCmd go otherwise?
>
> According to the manual it's supposed to be in the XferLog:
>
> Stdout from these commands will be written to the Xfer (or Restore)
> log file. One example of using these commands would be to shut down
> and restart a database server, dump a database to files for backup, or
> doing a snapshot of a share prior to a backup. Example:
>
> $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
>
> However this could have been written before
>
> $Conf{UserCmdCheckStatus}
>
> existed.
>
> I make the claim that any output that is generated by a BackupPC_dump
> command should be placed into the XferLOG (which is arguable misnamed
> and could be BackupAttemptLOG but such is life).
>
I'm not disagreeing, just saying that is the way it may be coded now.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|