Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Robert E. Wooden
I am, please post your details.

Robert Wooden
Nashville, TN. USA

Computer Freedom? . . . Linux


On 09/06/2011 12:17 AM, Michael Stowe wrote:

 The latter part is a fairly trivial addition to the scripts I use to
 invoke shadow copies ... I'll provide details (and scripts) if anybody's
 interested.



--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread egrimisu
Hi guys,
thanks for posting the small guide,

unfortunettly it does not work for me, the message that i get is 2011-09-06 
11:06:31 no ping response

what i did exacly is

create /etc/backuppc/wolping.bsh with the code in the guide, added owner 
backuppc and group www-data , 777 rights just to be sure
set PingPath to /etc/backuppc
deleted content for NmbLookupFindHostCmd (blank)
added to /etc/ethers a clinet pc's mac and hostname
what i haven't understood is who will execute wolping.bsh? how backuppc knows 
to execute that specific file?

Am i missing anythig?
thanks

+--
|This was sent by egrim...@yahoo.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread egrimisu
Hi guys,
thanks for posting the small guide,

unfortunettly it does not work for me, the message that i get is 2011-09-06 
11:06:31 no ping response

what i did exacly is

create /etc/backuppc/wolping.bsh with the code in the guide, added owner 
backuppc and group www-data , 777 rights just to be sure
set PingPath to /etc/backuppc
deleted content for NmbLookupFindHostCmd (blank)
added to /etc/ethers a clinet pc's mac and hostname
what i haven't understood is who will execute wolping.bsh? how backuppc knows 
to execute that specific file?

Am i missing anythig?
thanks

+--
|This was sent by egrim...@yahoo.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread egrimisu
Hi guys,
thanks for posting the small guide,

unfortunettly it does not work for me, the message that i get is 2011-09-06 
11:06:31 no ping response

what i did exacly is

create /etc/backuppc/wolping.bsh with the code in the guide, added owner 
backuppc and group www-data , 777 rights just to be sure
set PingPath to /etc/backuppc
deleted content for NmbLookupFindHostCmd (blank)
added to /etc/ethers a clinet pc's mac and hostname
what i haven't understood is who will execute wolping.bsh? how backuppc knows 
to execute that specific file?

Am i missing anythig?
thanks

+--
|This was sent by egrim...@yahoo.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Michael Stowe
 I am, please post your details.

 Robert Wooden
 Nashville, TN. USA

These are my changes to Salik Rafiq's original script:
- Added args 3 and 4 to ping (bit of a hack)
- Replaced ethwake with wakeonlan
- Look up individual hardware addresses from files created with arp -a
machine  machine.wol for simplicity
- Save state of machine
- Directory is hardcoded to /usr/tools/wol for no particular reason
==

#!/bin/bash

#this script is totally designed for the backuppc ping command
#which is the first thing it does before it starts a backup
#this is a substitute which pings the machine, if it is not
#awake then it wakes it using a magic packet - using the wol.bsh script
#then pings again to make sure

PING=/bin/ping
ARG1=$1
ARG2=$2
ARG3=$3
ARG4=$4
WAKEHOST=$5
ETHWAKE=/usr/bin/wakeonlan
SLEEPTIME=3m

logger Backuppc pinging  $1 $2 $3 $4 $5

function getwol {
if [ -f /usr/tools/wol/$1.wol ]; then
   $hwaddr = $(cat /usr/tools/wol/$1.wol | cut -d  -f4)
else
   logger No MAC address for $1
   exit -1
fi
}

function fwol {
TO_WAKEUP=$1
getwol $1
sudo $ETHWAKE $hwaddr
}

$PING $ARG1 $ARG2 $ARG3 $ARG4 $WAKEHOST /dev/null 21

if [ $? -ne 0 ]; then
fwol $WAKEHOST
if [ $WOL_RES = FAIL ]; then
exit 1
fi
echo OFF  /usr/tools/wol/$WAKEHOST.state
sleep $SLEEPTIME
$PING $ARG1 $ARG2 $WAKEHOST
if [ $? -eq 0 ]
then
   logger success waking $WAKEHOST.
else
   logger unable to wake $WAKEHOST.
   exit 1
fi
else
   $PING $ARG1 $ARG2 $ARG3 $ARG4 $WAKEHOST
   echo ON  /usr/tools/wol/$WAKEHOST.state
fi

exit 0

===

This is the postusercmd.sh I use for every windows box:

#!/bin/bash
WINEXE=/usr/bin/winexe
UNAME=Username
PWD=Password
WRKGRP=WORKGROUP
BOX=$1
PID=$($WINEXE -U $UNAME -W $WRKGRP --password=$PWD //$BOX 'cmd /c echo '1'
 c:\backuppc\wake.up')
echo Rsync and shadow copy unloaded
if [ -f /usr/tools/wol/$BOX.state ]; then
   read wasoff  /usr/tools/wol/$BOX.state
   if [ $wasoff -eq OFF ]; then
  $WINEXE -U $UNAME --password=$PWD //$BOX 'shutdown -f -s -c Backup
Complete'
   fi
fi

==

The original is from http://www.goodjobsucking.com/?p=62 -- only the last
bit that reads the machine state and shuts it down cleanly has been added.
 (Works on XP and Windows 7.)


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Michael Stowe
 Hi guys,
 thanks for posting the small guide,

 unfortunettly it does not work for me, the message that i get is
 2011-09-06 11:06:31 no ping response

 what i did exacly is

 create /etc/backuppc/wolping.bsh with the code in the guide, added owner
 backuppc and group www-data , 777 rights just to be sure
 set PingPath to /etc/backuppc

No.  PathPath is the path to the ping command, so in this case, it would
be /etc/backuppc/wolping.bsh -- not just the directory, which cannot be
executed.

This gets called by PingCmd, which in my case, is set to:
$pingPath -c 1 -w 3 $host

I note that Salik's script assumes that the host name is the third
argument, so I just altered the script.  You may want to alter the PingCmd
to suit the script you're using, or vice versa.

 deleted content for NmbLookupFindHostCmd (blank)
 added to /etc/ethers a clinet pc's mac and hostname
 what i haven't understood is who will execute wolping.bsh? how backuppc
 knows to execute that specific file?

 Am i missing anythig?
 thanks


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Holger Parplies
Hi,

egrimisu wrote on 2011-09-06 01:26:54 -0700 [[BackupPC-users]  Getting backuppc 
to wol a client]:
 Hi guys,
 thanks for posting the small guide,

I suppose this is meant to reference the other thread of the same name from
today. Will users of the braindead forum ever learn to press the correct
reply button? Will they ever learn that you cannot edit email messages? The
forum certainly won't learn.

 unfortunettly it does not work for me,

Unfortunate for *us*.

 777 rights just to be sure

This is just plain stupid. If you are *lucky*, this will simply prevent it from
working. There's no substitute for thinking. If there was, sticking a kick me
sign on your back wouldn't be it.

I would have simply ignored this thread, but I'm not going to leave this sort
of nonsense around uncommented.

 Am i missing anythig?

Yes. An 'n' for starters ...

Regards,
Holger

P.S.: If you ended up here through a web search and are wondering:
  777 is probably *never* a sensible file mode. If *anyone* can think
  of a *single* legitimate usage, please let me know. Thank you.
  If you don't understand permissions, start with symbolic modes (see
  chmod(1)). They're both more powerful and intuitive. Actually, unless
  you are a computer, you shouldn't be using octal modes. If you
  understand what you are doing, your opinion may vary.

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Robert E. Wooden
First, I created wolping.sh (notice change from .bsh to .sh) and put it 
into /etc/backuppc. Changed it permissions to allow execution (chmod 750 
[filename].) Changed owner to backuppc:www-data. Found 
NmbLookupFindHostCmd and made it blank.

Then set server pingpath to /etc/backuppc/wolping.sh. Created 
/etc/ethers containing my client mac addresses (because I had manually 
tested etherwake from server and it was working already so why change to 
wakeonlan.)

And it worked for me.

Robert Wooden
Nashville, TN. USA

Computer Freedom? . . . Linux


On 09/06/2011 03:26 AM, egrimisu wrote:
 Hi guys,
 thanks for posting the small guide,

 unfortunettly it does not work for me, the message that i get is 2011-09-06 
 11:06:31 no ping response

 what i did exacly is

 create /etc/backuppc/wolping.bsh with the code in the guide, added owner 
 backuppc and group www-data , 777 rights just to be sure
 set PingPath to /etc/backuppc
 deleted content for NmbLookupFindHostCmd (blank)
 added to /etc/ethers a clinet pc's mac and hostname
 what i haven't understood is who will execute wolping.bsh? how backuppc knows 
 to execute that specific file?

 Am i missing anythig?
 thanks

 +--
 |This was sent by egrim...@yahoo.com via Backup Central.
 |Forward SPAM to ab...@backupcentral.com.
 +--



 --
 Special Offer -- Download ArcSight Logger for FREE!
 Finally, a world-class log management solution at an even better
 price-free! And you'll get a free Love Thy Logs t-shirt when you
 download Logger. Secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsisghtdev2dev
 ___
 BackupPC-users mailing list
 BackupPC-users@lists.sourceforge.net
 List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
 Wiki:http://backuppc.wiki.sourceforge.net
 Project: http://backuppc.sourceforge.net/


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Michael Stowe
 First, I created wolping.sh (notice change from .bsh to .sh) and put it
 into /etc/backuppc.

I also prefer .sh for shell extensions, but it's only a preference,
there's no inherent meaning to the extension in *nixes, which I'm
mentioning in case anybody misunderstands that this fixed something.

On a vaguely related note, the FHS restricts /etc to static configuration
files, so this properly belongs in the /usr hierarchy, for example, under
/usr/local/bin.  Like extensions, the FHS is just a set of guidelines, and
failure to adhere to it doesn't result in any functional problems, of
course.

 Changed it permissions to allow execution (chmod 750
 [filename].) Changed owner to backuppc:www-data. Found
 NmbLookupFindHostCmd and made it blank.

 Then set server pingpath to /etc/backuppc/wolping.sh. Created
 /etc/ethers containing my client mac addresses (because I had manually
 tested etherwake from server and it was working already so why change to
 wakeonlan.)

For the record, pingpath can appear in local machine settings as well,
though the script doesn't cause any harm to run globally.

My choice of wakeonlan was partly arbitrary, since it happened to be handy
for my distro, but I don't really like the idea of maintaining
/etc/ethers.

 And it worked for me.

 Robert Wooden
 Nashville, TN. USA


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-06 Thread Robert E. Wooden
You are absolutely correct. I never considered the FHS and by your 
suggestion may, and most likely will, move to correct location in future.

Thank you for your help. Your polite suggestions are appreciated.

Robert Wooden
Nashville, TN. USA

Computer Freedom? . . . Linux


On 09/06/2011 11:24 AM, Michael Stowe wrote:

 On a vaguely related note, the FHS restricts /etc to static configuration
 files, so this properly belongs in the /usr hierarchy, for example, under
 /usr/local/bin.  Like extensions, the FHS is just a set of guidelines, and
 failure to adhere to it doesn't result in any functional problems, of
 course.


--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-05 Thread Robert E. Wooden
Answer to No. 1 question:Yes.
Answer to No. 2 question:Part 1: Because ten hours is, in my case, 
sufficient time for it to have safely completed it's tasks.Part 2: 
Been backing up my four computers like this since January, 2011. Had a 
completed backup everyday for each computer.

I have a small system. If I had, for example, 10 computers to backup, I 
would let backuppc server run all the time, backup during the night 
(like I do now) and all would be great. But, like I said, I'm small, so 
. . . .

Now I just need to get my clients to shutdown when they have completed 
their backup, hum . . . . next project!

Robert Wooden
Nashville, TN. USA

Computer Freedom? . . . Linux


On 09/04/2011 08:43 PM, Holger Parplies wrote:

 1. Is BackupPC_nightly getting a chance to run (regularly)?
 2. Supposing you are automatically shutting down your BackupPC server, how
 do you make sure you are doing that when everything is idle? In 
 particular,
 if the first backup attempt ever fails, will BackupPC get a chance to 
 retry,
 or will you miss a backup that day?

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-05 Thread Michael Stowe
 Answer to No. 1 question:Yes.
 Answer to No. 2 question:Part 1: Because ten hours is, in my case,
 sufficient time for it to have safely completed it's tasks.Part 2:
 Been backing up my four computers like this since January, 2011. Had a
 completed backup everyday for each computer.

 I have a small system. If I had, for example, 10 computers to backup, I
 would let backuppc server run all the time, backup during the night
 (like I do now) and all would be great. But, like I said, I'm small, so
 . . . .

 Now I just need to get my clients to shutdown when they have completed
 their backup, hum . . . . next project!

 Robert Wooden
 Nashville, TN. USA

Funnily enough, I put something like this together just tonight -- I
altered the original script to save the state of the machine (i.e.,
already on or off before the backup started) and then return it to that
state in a postcmd.

The latter part is a fairly trivial addition to the scripts I use to
invoke shadow copies ... I'll provide details (and scripts) if anybody's
interested.

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] Getting backuppc to wol a client

2011-09-04 Thread Robert E. Wooden
I have occasionally tried to get BackupPC to wol my clients. This 
weekend I got serious thanks to some activity on this forum.


Here is what I have got working this weekend.

I discovered this post: 
/http://blog.chameeya.com/2011/08/backuppc-and-waking-machines.html

/
I read through this article and it is so simple I had to try it. And, it 
just works so now, I am saving energy and my family (specifically my 
wife) is happier.


To further save energy, I set up my router (dd-wrt) to wake the BackupPC 
machine.


What can I say, it just feels good, too!!

--
Robert Wooden
Nashville, TN. USA

Computer Freedom? . . . Linux

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Getting backuppc to wol a client

2011-09-04 Thread Holger Parplies
Hi,

Robert E. Wooden wrote on 2011-09-04 15:41:44 -0500 [[BackupPC-users] Getting 
backuppc to wol a client]:
 I have occasionally tried to get BackupPC to wol my clients. [...]
 
 To further save energy, I set up my router (dd-wrt) to wake the BackupPC 
 machine.

saving energy is a fine thing, and I don't want to discourage that in any way,
but there are two questions that spring to my mind:

1. Is BackupPC_nightly getting a chance to run (regularly)?
2. Supposing you are automatically shutting down your BackupPC server, how
   do you make sure you are doing that when everything is idle? In particular,
   if the first backup attempt ever fails, will BackupPC get a chance to retry,
   or will you miss a backup that day?

Regards,
Holger

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/