Welcome! » Log In » Create A New Profile

wake machines for backup?

Posted by Anonymous 
wake machines for backup?
March 04, 2015 04:12PM
In an effort to reduce electricity costs I'm considering sleeping the office Macs during off hours and then waking them for rsnapshot backups. I've had rsnapshot working for many years now but I'm wondering if there's a good way to integrate the wake up process for each machine?

I found wol (wake on lan) which uses a MAC address and successfully woke up a snoozing iMac.

Does anyone have a working rsnapshot example with machine waking they can share?

Thanks,
-Terry

Terry Barnum
digital OutPost
http://www.dop.com

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
wake machines for backup?
March 04, 2015 05:12PM
Hi,

[quote]On March 5, 2015 at 12:55 AM Terry Barnum <terry < at > dop.com> wrote:
In an effort to reduce electricity costs I'm considering sleeping the
office Macs during off hours and then waking them for rsnapshot backups.
I've had rsnapshot working for many years now but I'm wondering if
there's a good way to integrate the wake up process for each machine?

I found wol (wake on lan) which uses a MAC address and successfully woke
up a snoozing iMac.

Does anyone have a working rsnapshot example with machine waking they
can share?
[/quote]
Sadly no. But have you thought about using a cmd_preexec script? I would
consider writing a script to execute before each backup (pseudocode):
#check if iMac available
if ping -c 1 $ip
return
# send wake on lan
wol $MAC
# wait til iMac is up and available
counter=0
while ping is not successful
increment counter
if counter > 10
return

It is obvious to say, but I would recommend also writing a cmd_postexec
script, which logs into your iMac and puts it into sleep again.

Cheers,
Benedikt Heine

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
wake machines for backup?
March 04, 2015 05:46PM
[quote]On Mar 4, 2015, at 5:10 PM, Benedikt Heine <benedikt < at > heine.rocks> wrote:

Hi,

[quote]On March 5, 2015 at 12:55 AM Terry Barnum <terry < at > dop.com> wrote:
In an effort to reduce electricity costs I'm considering sleeping the
office Macs during off hours and then waking them for rsnapshot backups.
I've had rsnapshot working for many years now but I'm wondering if
there's a good way to integrate the wake up process for each machine?

I found wol (wake on lan) which uses a MAC address and successfully woke
up a snoozing iMac.

Does anyone have a working rsnapshot example with machine waking they
can share?
[/quote]
Sadly no. But have you thought about using a cmd_preexec script? I would
consider writing a script to execute before each backup (pseudocode):
#check if iMac available
if ping -c 1 $ip
return
# send wake on lan
wol $MAC
# wait til iMac is up and available
counter=0
while ping is not successful
increment counter
if counter > 10
return

It is obvious to say, but I would recommend also writing a cmd_postexec
script, which logs into your iMac and puts it into sleep again.

Cheers,
Benedikt Heine
[/quote]
Thank you for the reply Benedikt. I have about a dozen machines and I'm concerned that doing it first in cmd_preexec could mean machines start to fall asleep again by the time rsnapshot gets to them.

Would running something in backup_script work? Can I pass an argument to the script? It's not clear from rsnapshot.conf.default.

Thanks,
-Terry

Terry Barnum
digital OutPost
http://www.dop.com

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
wake machines for backup?
March 04, 2015 06:09PM
Hi,

[quote]On March 5, 2015 at 2:45 AM Terry Barnum <terry < at > dop.com> wrote:
Thank you for the reply Benedikt. I have about a dozen machines and I'm
concerned that doing it first in cmd_preexec could mean machines start
to fall asleep again by the time rsnapshot gets to them.
[/quote]
Yep, if you backup all your machines with one config-file cmd_preexec
probaly won't work.

[quote]Would running something in backup_script work? Can I pass an argument to
the script? It's not clear from rsnapshot.conf.default.
[/quote]
Of course you could do. Anything between the two tabs should be executed
by the shell. The only downside is, that you have in your snapshot_root a
stale folder.

Cheers,
Bene

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
wake machines for backup?
March 05, 2015 12:23AM
Hallo, Terry,

Du meintest am 04.03.15:

[quote][quote][quote]On March 5, 2015 at 12:55 AM Terry Barnum <terry < at > dop.com> wrote:
In an effort to reduce electricity costs I'm considering sleeping
the office Macs during off hours and then waking them for rsnapshot
backups. I've had rsnapshot working for many years now but I'm
wondering if there's a good way to integrate the wake up process
for each machine?

I found wol (wake on lan) which uses a MAC address and successfully
woke up a snoozing iMac.

Does anyone have a working rsnapshot example with machine waking
they can share?
[/quote][/quote][/quote]
[quote][quote]Sadly no. But have you thought about using a cmd_preexec script? I
would consider writing a script to execute before each backup
(pseudocode): #check if iMac available
if ping -c 1 $ip
return
# send wake on lan
wol $MAC
# wait til iMac is up and available
counter=0
while ping is not successful
increment counter
if counter > 10
return

It is obvious to say, but I would recommend also writing a
cmd_postexec script, which logs into your iMac and puts it into
sleep again.
[/quote][/quote]
[quote]Thank you for the reply Benedikt. I have about a dozen machines and
I'm concerned that doing it first in cmd_preexec could mean machines
start to fall asleep again by the time rsnapshot gets to them.
[/quote]
Again the usual advice:

for each backup job (for each machine) a separate *.conf, with separate
*.pid, *.log.

Then no job disturbs the other jobs.

-------------

Don't put all eggs into one basket!

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Sorry, only registered users may post in this forum.

Click here to login