BackupPC-users

[BackupPC-users] BackupPC not recording DumpPreUserCmd in XferLOG if non-zero exit is not ignored.

2009-02-24 15:11:15
Subject: [BackupPC-users] BackupPC not recording DumpPreUserCmd in XferLOG if non-zero exit is not ignored.
From: John Rouillard <rouilj-backuppc AT renesys DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 24 Feb 2009 20:07:04 +0000
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.

For example I have:

  # Last error is "DumpPreUserCmd returned error status 256". 

and the directory lists:

 sudo ls /backup-pc/pc/concord.example.com/
   0  backups      LOCK        XferLOG.0.z  XferLOG.z
   1  backups.old  LOG.022009  XferLOG.1.z

 sudo ls -l /backup-pc/pc/concord.renesys.com/XferLOG.z
   -rw-r----- 1 backup dev 0 Feb 24 11:55 
/backup-pc/pc/concord.example.com/XferLOG.z

This is with:

  $Conf{UserCmdCheckStatus} = 1;

enabled. I have to have that enabled as the DumpPreUserCmd controlls
how many backups I have per remote site running at the same time.

In BackupPC I set up 8 silumtaneous slots for backups to control the
amount of data running into the backup box. Then I have 2 slots for
site A and 2 slots for site B and 4 slots for site C to control the
amount of bandwidth that is consumed at each remote site. If BackupPC
schedues a backup for a system at site C and all 4 slots are already
taken up, the DumpPreUserCmd exits with status 1 and prevents a new
backup to that site. Then BackupPC goes onto the next system that is
eligible to be backed up.

Can anybody confirm that xferlogs are not being written if
DumpPreUserCmd exits non-zero with $Conf{UserCmdCheckStatus} = 1? Also
does anybody know if it is fixed in a subsequent release?

-- 
                                -- rouilj

John Rouillard
System Administrator
Renesys Corporation
603-244-9084 (cell)
603-643-9300 x 111

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