BackupPC-users

[BackupPC-users] BackuPC with Monit

2015-10-11 21:03:22
Subject: [BackupPC-users] BackuPC with Monit
From: madams9 <backuppc-forum AT backupcentral DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Sun, 11 Oct 2015 15:28:21 -0700
This may not be the correct place to ask my question. If not just let me know. 
Also, I don't have tons of experience with BackupPC or Monit, so apologies for 
ignorance.

I am working on my home network. Nothing mission critical at this point. The 
network serves mostly to support my HTPC. All machines are running the most 
recent release of Mageia Linux.

At any rate, I have a BackupPC installation on a server in a closet. It is 
connected to the network wirelessly. I understand the implications but remember 
- this is my personal network in my home and there is nothing mission critical 
for that backup server.  If the backup server goes down, I can cope for any 
period running days to months with no noticeable risk.

Having said that, I was subject to a number of outages owing to aging hardware 
falling off the network for no reason. I have since replaced that hardware and 
uptime on the network for that server has been in the very high 90% range. 
However, I would like to find a solution in the event that the backuppc server 
becomes unavailable on the network.

I have tried bash scripts on the server itself that test for the network and 
restart network services. This seemed to be effective at least part of the time 
until the hardware started to just wear out. New hardware has put a stop to 
development of this solution The old scripts may work just fine, but I am after 
a more reliable means of dealing with the issue and outages are rare these days.

I've also considered simply having another machine on the network monitor for 
presence of the backup server's ip address under a cron job and send email 
notification when the backup server disappears. But that does not contribute 
toward getting the server to at least attempt to rejoin the network.

What I'm trying to implement at this point, is a monit solution 
(https://mmonit.com/monit/). It seems possible to have monit monitor presence 
of BackupPC as well as the network and take appropriate steps to resolve these 
issues on it's own.  Monitoring the network presence is a done thing. Guidance 
for taat  is well documented.  Resources to help monit work with BackupPC seem 
to be totally non-existent as I have been able to find zero help with the issue.

Here's where I need help: the configuration for this task in my monitrc file so 
far is this:

## BACKUP PC
check process backuppc with pidfile "/var/log/backuppc/BackupPC.pid"
start program "/usr/sbin/service backuppc start"
stop program "/usr/sbin/service backuppc stop"
if failed host adamsmdk port 16073 proto http then restart # change if not 
listening locally
###

Obviously, that last line is trash because the backuppc socket process starts a 
different port everytime it's initiated. Aside from that, I have no idea how 
monit is supposed to test for the presence of backuppc. 

Another thing that may not come into play here is that, despite these systems 
running systemd, starting and stopping the backuppc process is only successful 
if I do it via the old service command rather than systemctl. I'm not entirely 
sure how Monit handles all that, but at the command line, I need to use the old 
system command which then passes it on to systemctl.  Kind of weird. Just 
wanted to get that information out there.

Anybody have any suggestions on this?

Thanks.


Mark

+----------------------------------------------------------------------
|This was sent by madams9 AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT 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/

<Prev in Thread] Current Thread [Next in Thread>