BackupPC-users

Re: [BackupPC-users] Windows 7 client goes to sleep during backup

2014-06-11 01:58:27
Subject: Re: [BackupPC-users] Windows 7 client goes to sleep during backup
From: "Edward A. Hildum" <ehildum AT comcast DOT net>
To: backuppc-users AT lists.sourceforge DOT net
Date: Tue, 10 Jun 2014 22:56:41 -0700
On 06/08/2014 06:26 PM, Andrew Schulman wrote:
>> I'm using a Centos 6 system running BackupPC 3.3.0 to back up a small
>> home network of mixed linux and windows PCs.  I recently added a windows
>> 7 (professional) box and installed cygwin 1.7.29 on it. I'm using rsync
>> over an ssh tunnel to back it up.  I've got password-less ssh running,
>> and rsync works fine, as long as the machine stays awake.  The problem
>> is that windows puts itself to sleep before the backup can complete.
>>
>> I've got wake-on-lan working, so I can wake the machine up if it starts
>> out asleep, and I can run commands on it via ssh, so I can use
>> powercfg.exe to (supposedly) set power options.  I have tried creating a
>> power scheme on windows that disables sleeping and prevents spinning the
>> disks down for long enough to do a back up.  I can use powercfg to
>> switch to that power scheme -- I can log in and see the power scheme has
>> changed -- but windows still goes back to sleep in a few minutes.
>>
>> Does anybody know a way of telling windows not to sleep that will work
>> if no user is logged in?
> Cygwin includes nosleep, a program that tries to inhibit idle sleep,
> which seems to be what you want.  So you can set e.g.
>
> $Conf{RsyncClientCmd}        = '$sshPath -q -x $host /usr/bin/nosleep 
> --awaymode $rsyncPath $argList+';
> $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x $host /usr/bin/nosleep 
> --awaymode $rsyncPath $argList+';
>
> which is what I do.  According to the nosleep documentation, --awaymode
> means that "The computer will appear to be asleep, but the command will
> continue executing."  I haven't tested it much, but it's worth a try.
>
> Andrew
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://www.hpccsystems.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/
>
Andrew,
     Thanks for your quick reply.  Nosleep appears to be exactly what I 
need.  I've added it to the rsync backup & restore commands as you 
suggest.  I'm still trying to convince myself its doing what I need.  So 
far, I've run two backups with that configuration.  The first 
(incremental) backup finished, but the second failed before it was 
done.  The client machine didn't respond to a ping, so I think it had 
gone back to sleep.  I'm wondering whether nosleep works if nobody is 
logged in to the machine.  The machine is set up for wake-on-lan, which 
works, but if no user is logged in, it goes back to sleep in a few minutes.

Ted


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
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>