BackupPC-users

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

2014-06-08 21:28:32
Subject: Re: [BackupPC-users] Windows 7 client goes to sleep during backup
From: Andrew Schulman <andrex AT alumni.utexas DOT net>
To: backuppc-users AT lists.sourceforge DOT net
Date: Sun, 08 Jun 2014 21:26:50 -0400
> 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/

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