Re: [BackupPC-users] prevent full OS partition when data disk fails
Hi guys, I must say, I'm again really happy about the help I have received from all of you through this list! Since Backuppc works so nicely, it had been a couple of years that I last had to ask something, but I see that the community is still as alive as before :-). More comments inline below. Van: Les Mikesell [mailto:lesmikes...@gmail.com] Verzonden: woensdag 15 juli 2015 4:44 Aan: General list for user discussion, questions and support Onderwerp: Re: [BackupPC-users] prevent full OS partition when data disk fails On Tue, Jul 14, 2015 at 8:29 PM, backu...@kosowsky.org wrote: Les Mikesell wrote at about 17:39:02 -0500 on Tuesday, July 14, 2015: On Tue, Jul 14, 2015 at 5:31 AM, Jürgen Depicker jurgen.depic...@let.be wrote: Hello, I wonder what is best practice to prevent the OS partition to fill up whenmy data disk fails. My setup: all virtualized; all backups stored in /var/lib/backuppc , butthat is /dev/sdb1 mounted there. So if that drive fails, I’m pretty sureBackuppc will fill up my / partition recreating the backup in the then empty/var/lib/backuppc . How can I prevent this? I guess changing topDir may be an option, but there may be a more elegantsolution? I think that is a fairly unlikely scenario unless it is an external drive being optionally automounted. When I've seen drive failures on running systems, the filesystem goes read-only or causes errors instead of being unmounted, and on boot, failing to mount a partition listed in fstab is fatal. [(JDE)] The thing is, my Backuppc server has two virtual disks, one the main OS and one for data. The NAS had power failures last weekend due to still unknown reasons presently, but the result was the server running, as suggested below, in readonly mode. I didn't get noticed about that automatically; probably I missed out on some essential server configuration? Anyhow, now I put the OS disk no longer on that NAS, and want to prevent the OS disk filling up in case the NAS goes down again. So I'll go with Paolo's very interesting (and working) hint: If you did follow BPC install instructions, BPC should work with a non root user (say backuppc). Then you can give mount point directory restrictive permissions (while backuppc filesystem is unmounted): /etc/init.d/backuppc stop (or similar) umount /dev/sdb1 chown root:root /var/lib/backuppc chmod 750 /var/lib/backuppc When you mount the fs again the permission are that of the mounted fs and BPC can write (I assume you use a unix fs, like ext3/4, xfs or so, not fat nor ntfs). If /dev/sdb1 fails to be mounted, then BackupPC daemons cannot write to the mount point and your root partition does not fill up. [(JDE)] Tested and working! Maybe not too unlikely. I have a consumer NAS device that I NFS mount. One of the disks failed causing the NAS to crash and somehow unmount... A couple of days later I noticed that my root partition was 100% full and couldn't figure out why... Some sleuthing with divide conquer 'df -s' type commands narrowed it down to /var/lib and then I remembered about the NAS crash. Sure enough /var/lib/Backuppc was full... I think what happens with NFS depends on the mount options in fstab. If you want, you can force the mounting system to hang and wait for the server to be available again (which might not be that desirable either). [(JDE)] You're surely right: with NFS this can be done. But Paolo's suggestion seems bullet-proof to me. Greetings, Jürgen -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
On Tue, 14 Jul 2015 10:31:42 + Jürgen Depicker jurgen.depic...@let.be wrote: My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I'm pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? Hi Jürgen, It'll fail - and it's easy to test: unmount your HD, make sure you do not have the original directories into /var/lib/backuppc and restart backuppc. 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] prevent full OS partition when data disk fails
Hello, I wonder what is best practice to prevent the OS partition to fill up when my data disk fails. My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I'm pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? I guess changing topDir may be an option, but there may be a more elegant solution? Kind regards, Jürgen -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
Van: B [mailto:lazyvi...@gmx.com] Verzonden: dinsdag 14 juli 2015 13:13 Aan: backuppc-users@lists.sourceforge.net Onderwerp: Re: [BackupPC-users] prevent full OS partition when data disk fails On Tue, 14 Jul 2015 10:31:42 + Jürgen Depicker jurgen.depic...@let.be wrote: My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I'm pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? Hi Jürgen, It'll fail - and it's easy to test: unmount your HD, make sure you do not have the original directories into /var/lib/backuppc and restart backuppc. [(JDE)] Well, thanks for the swift reply, but it's a little more complicated, since it's all virtualized, and I cannot easily simulate 'disconnect the sata cable'. 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 -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
On Tue, 14 Jul 2015 11:40:58 + Jürgen Depicker jurgen.depic...@let.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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
If you did follow BPC install instructions, BPC should work with a non root user (say backuppc). Then you can give mount point directory restrictive permissions (while backuppc filesystem is unmounted): /etc/init.d/backuppc stop (or similar) umount /dev/sdb1 chown root.root /var/lib/backuppc chmod 750 /var/lib/backuppc When you mount the fs again the permission are that of the mounted fs and BPC can write (I assume you use a unix fs, like ext3/4, xfs or so, not fat nor ntfs). If /dev/sdb1 fails to be mounted, then BackupPC daemons cannot write to the mount point and your root partition does not fill up. Sorry for my poor english Bye ___ *Paolo Basenghi – Sistemi Informativi* /Az.Spec.Farmacie Comunali Riunite Via Doberdò 9 - 42122 Reggio Emilia Tel +39(0522)543312 – Fax +39(0522)550146 email: paolo.basen...@fcr.re.it mailto:paolo.basen...@fcr.re.it www.fcr.re.it http://www.fcr.re.it/ - www.informazionisuifarmaci.it http://www.informazionisuifarmaci.it/ www.saninforma.it http://www.saninforma.it/ - www.futurfarma.it http://www.futurfarma.it// Le informazioni contenute in questa comunicazione sono riservate e destinate esclusivamente alla/e persona/e o all'ente sopra indicati. E' vietato ai soggetti diversi dai destinatari qualsiasi uso, copia, diffusione di quanto in esso contenuto sia ai sensi dell'art. 616 c.p., sia ai sensi della legge 196/2003. Se questa comunicazione vi è pervenuta per errore, vi preghiamo di rispondere a questa mail e successivamente cancellarla dal vostro sistema. Il 14/07/2015 12:31, Jürgen Depicker ha scritto: Hello, I wonder what is best practice to prevent the OS partition to fill up when my data disk fails. My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I’m pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? I guess changing topDir may be an option, but there may be a more elegant solution? Kind regards, *Jürgen* -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/ -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
On Tue, Jul 14, 2015 at 8:29 PM, backu...@kosowsky.org wrote: Les Mikesell wrote at about 17:39:02 -0500 on Tuesday, July 14, 2015: On Tue, Jul 14, 2015 at 5:31 AM, Jürgen Depicker jurgen.depic...@let.be wrote: Hello, I wonder what is best practice to prevent the OS partition to fill up when my data disk fails. My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I’m pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? I guess changing topDir may be an option, but there may be a more elegant solution? I think that is a fairly unlikely scenario unless it is an external drive being optionally automounted. When I've seen drive failures on running systems, the filesystem goes read-only or causes errors instead of being unmounted, and on boot, failing to mount a partition listed in fstab is fatal. Maybe not too unlikely. I have a consumer NAS device that I NFS mount. One of the disks failed causing the NAS to crash and somehow unmount... A couple of days later I noticed that my root partition was 100% full and couldn't figure out why... Some sleuthing with divide conquer 'df -s' type commands narrowed it down to /var/lib and then I remembered about the NAS crash. Sure enough /var/lib/Backuppc was full... I think what happens with NFS depends on the mount options in fstab. If you want, you can force the mounting system to hang and wait for the server to be available again (which might not be that desirable either). -- Les Mikesell lesmikes...@gmail.com -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
Les Mikesell wrote at about 17:39:02 -0500 on Tuesday, July 14, 2015: On Tue, Jul 14, 2015 at 5:31 AM, Jürgen Depicker jurgen.depic...@let.be wrote: Hello, I wonder what is best practice to prevent the OS partition to fill up when my data disk fails. My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I’m pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? I guess changing topDir may be an option, but there may be a more elegant solution? I think that is a fairly unlikely scenario unless it is an external drive being optionally automounted. When I've seen drive failures on running systems, the filesystem goes read-only or causes errors instead of being unmounted, and on boot, failing to mount a partition listed in fstab is fatal. Maybe not too unlikely. I have a consumer NAS device that I NFS mount. One of the disks failed causing the NAS to crash and somehow unmount... A couple of days later I noticed that my root partition was 100% full and couldn't figure out why... Some sleuthing with divide conquer 'df -s' type commands narrowed it down to /var/lib and then I remembered about the NAS crash. Sure enough /var/lib/Backuppc was full... -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] prevent full OS partition when data disk fails
On Tue, Jul 14, 2015 at 5:31 AM, Jürgen Depicker jurgen.depic...@let.be wrote: Hello, I wonder what is best practice to prevent the OS partition to fill up when my data disk fails. My setup: all virtualized; all backups stored in /var/lib/backuppc , but that is /dev/sdb1 mounted there. So if that drive fails, I’m pretty sure Backuppc will fill up my / partition recreating the backup in the then empty /var/lib/backuppc . How can I prevent this? I guess changing topDir may be an option, but there may be a more elegant solution? I think that is a fairly unlikely scenario unless it is an external drive being optionally automounted. When I've seen drive failures on running systems, the filesystem goes read-only or causes errors instead of being unmounted, and on boot, failing to mount a partition listed in fstab is fatal. -- Les Mikesell lesmikes...@gmail.com -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/