BackupPC-users

Re: [BackupPC-users] prevent full OS partition when data disk fails

2015-07-14 08:25:37
Subject: Re: [BackupPC-users] prevent full OS partition when data disk fails
From: Bzzzz <lazyvirus AT gmx DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Tue, 14 Jul 2015 14:23:53 +0200
On Tue, 14 Jul 2015 11:40:58 +0000
Jürgen Depicker <Jurgen.Depicker AT let DOT be> wrote:


> Unmounting /dev/sdb1 while Backuppc
> service is running is not possible either,
> so my other option would be
> to shutdown one of the virtual disk servers which I don't really want
> to do... Greetings, J

Simpler answer: IF you left the original /var/lib/backuppc as is (read:
with its original directories), then you're doomed and need to stop
backuppc, umount HD (virtual or not) and remove these directories
manually to avoid backuppc starting when the other HD isn't mounted.

The only other solution I see would be to run a script that check
if your HD's mounted (before starting any backup) and return a 
value ≠ 0 that'll prevent backuppc to launch any backup (see:
$Conf{DumpPreUserCmd} & $Conf{UserCmdCheckStatus}.)

So, your script would be some' like (mine is encrypted and not alone,
hence the "encfs" first search):

#!/bin/sh
MYHDTHATISMOUNTEDFORBACKUPPC=`grep encfs /etc/mtab | grep 1.8TB_USB_01`
if [ "$MYHDTHATISMOUNTEDFORBACKUPPC" = "" ] ; then
        # Operator is a FBFH that forgot to mount the backuppc HD
        exit -1
else
        # Operator is not a lousy drunk
        exit 0
fi


JY

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
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/