BackupPC-users

Re: [BackupPC-users] General questions about the background queue and link commands.

2011-02-03 12:32:03
Subject: Re: [BackupPC-users] General questions about the background queue and link commands.
From: Robin Lee Powell <rlpowell AT digitalkingdom DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 3 Feb 2011 09:30:17 -0800
On Thu, Feb 03, 2011 at 09:22:00AM -0800, Robin Lee Powell wrote:
> OK, so the question becomes, how do I monitor for general backup
> queue problems?  I've had situations where something gets stuck,
> like a nightly job, and the queue gets backed up, and I want to
> detect that.
> 
> I guess if I could get access to the backup age that's on the host
> summary, from a script, that would do.

Got it; short version below, remind me to post after the real script
is done:

for num in $(sudo -u backuppc BackupPC_serverMesg status hosts | sed 
's/},[{"]/\n/g' | grep lastGoodBackupTime | sed 's/.*"lastGoodBackupTime" => 
"//' | sed 's/".*//' )
do
  if [ $[$(date +%s) - $num] -gt 77760 ]
  then
    echo "needs backup"
  fi
done

-Robin

-- 
http://singinst.org/ :  Our last, best hope for a fantastic future.
Lojban (http://www.lojban.org/): The language in which "this parrot
is dead" is "ti poi spitaki cu morsi", but "this sentence is false"
is "na nei".   My personal page: http://www.digitalkingdom.org/rlp/

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
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/