BackupPC-users

Re: [BackupPC-users] BackupPC and power saving

2009-10-15 12:18:44
Subject: Re: [BackupPC-users] BackupPC and power saving
From: Tino Schwarze <backuppc.lists AT tisc DOT de>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 15 Oct 2009 18:15:05 +0200
On Thu, Oct 15, 2009 at 11:20:10AM -0400, Robert Kosinski wrote:

> > 1)boot on bios power-on schedule
> > 2)let backuppc process all backups.  should automatically happen due to the
> > wakeup schedule though I would shorten that period.
> > 3)run a script to determine if backuppc is doing a backup, if so then sleep
> > for your wakeup schedule + 1 minute, if not then execute backuppc nightly
> > 4)trigger a shutdown when backuppc nightly completes.
> 
> I built a surprisingly simple proof of concept around the above flow,
> and it looks like the idea is valid. There are still bugs to track
> down and race conditions to examine, but I don't think it's too early
> to call the idea of "BackupPC Green" a success.
> 
> Some followup questions:
> 
> Does "activeJob" still equal 1 during the link stage? I'm having
> trouble catching a backup when it's doing so.
 
I just catched a host in link stage and it has activeJob=1:

"myhost" => {"lastGoodBackupTime" => "1255622063","deadCnt" =>
0,"reason" => "Reason_backup_done","activeJob" => 1,"state" =>
"Status_link_running","aliveCnt" => 575,"endTime" =>
"1255622063","needLink" => 0,"startTime" => "1255611675","type" =>
"incr","userReq" => undef},

> Speaking of "activeJob", I haven't found a way to answer the question
> "Are any hosts active?" Using BackupPC_serverMesg status hosts doesn't
> work because trashClean always reports itself as active. Is there any
> other criterion I could use to examine all possible jobs to see if any
> are active? My proof of concept only examined a single host.

Maybe you could better use "status jobs" instead? It looks like this:

%Jobs = (
" admin " => 
  {"cmd" => "/path/to/BackupPC-3.1.0/bin/BackupPC_nightly -m 192 255",
   "reqTime" => "1255622404","mesg" => "","pid" => 29003,"fh" => *::FH,
   "user" => "BackupPC","startTime" => "1255622404","type" => undef,"fn" => 7},
" trashClean " => 
  {"cmd" => "/path/to/BackupPC-3.1.0/bin/BackupPC_trashClean",
   "reqTime" => "1234604612","mesg" => "","pid" => 6293,"fh" => *::FH,
   "user" => "BackupPC","processState" => "running","startTime" => "1234604612",
   "type" => undef,"fn" => 5},
"myhost" => 
  {"cmd" => "/path/to/BackupPC-3.1.0/bin/BackupPC_link myhost",
   "reqTime" => "1255622063","pid" => 28848,"fh" => *::FH,
    "user" => "BackupPC","startTime" => "1255622063","type" => "incr",
    "fn" => 6});

-> So just use the result as the perl hash it is, remove the trashClean
entry (which is not critical to interrupt at any time) and check the
size of the resulting hash.

HTH,

Tino.

-- 
"What we nourish flourishes." - "Was wir nähren erblüht."

www.lichtkreis-chemnitz.de
www.craniosacralzentrum.de

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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/