BackupPC-users

Re: [BackupPC-users] $Conf{UserCmdCheckStatus} not working?

2012-03-06 04:21:26
Subject: Re: [BackupPC-users] $Conf{UserCmdCheckStatus} not working?
From: Till Hofmann <hofmanntill AT googlemail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 6 Mar 2012 10:18:27 +0100


On Mon, Mar 5, 2012 at 7:52 PM, Les Mikesell <lesmikesell AT gmail DOT com> wrote:
On Mon, Mar 5, 2012 at 10:32 AM, Till Hofmann
<hofmanntill AT googlemail DOT com> wrote:
> Hello everybody,
>
> I have a small bash script which creates an LVM snapshot for every LVM
> volume I back up. If the script can't create the logical volume, it exits
> with the return value of the lvcreate command, as you can see here:
>>
>> lvcreate -n "$orig"backup -s "$devicedir$orig" -l 100%FREE
>> retlv=$?
>> if [ $retlv -ne 0 ]; then
>> echo "Error creating logical volume. return value: $retlv"
>> exit $retlv
>> fi
>
>
> I set $Conf{UserCmdCheckStatus} to 1, so the backup should be aborted if the
> script returns an error, shouldn't it? This is what happens:
>>
>> Executing DumpPreShareCmd: /usr/bin/ssh -q -x -l backuppc singsung sudo
>> /usr/local/bin/pre-backup /mnt/backup/homelv
>>   Logical volume "homelvbackup" already exists in volume group "cryptpool"
>> Error creating logical volume. return value: 5
>>
>> full backup started for directory /mnt/backup/homelv (baseline backup #36)
>
>
> Maybe I just read the manual wrong, but isn't backuppc supposed to abort
> this backup?

You are executing a preshare cmd and the docs only specify the preuser
cmds as aborting.   It does say that the DumpPostShareCmd should not
be executed if the PreShare fails, but not whether it should abort at
that point.

 
You're right, it only says it aborts if the PreUserCmd fails.
Is there any way to simulate that behaviour for preshare commands? 

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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/
<Prev in Thread] Current Thread [Next in Thread>