From: Till H. <hof...@go...> - 2012-03-05 16:33:12
|
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? Or did I do a mistake in my script (I don't use bash too often)? Here is the complete script: http://pastebin.com/y0gpAh6V Thanks for any advice Till Hofmann |