I have written a bash script that performs a remote wakeup of my backup
server using etherwake.  The script  is initiated from my backup client  -
not the server.

ping -c 3 $server > /dev/null
if [ $? -eq 0 ]
then
        echo "$server is already up and running\n"
else
#Wake up server
        echo "Waking up server $server\n"
        sudo /usr/sbin/etherwake -D -i eth0  00:0c:6e:xx:xx:xx
        sleep 120
fi


Next,  it runs rsync to perform the backup.  Substitute your own backup
command as you see fit.

rsync -aRzv --progress --delete  --log-file=/tmp/rsync.log  \
`cat /home/user/rsynclist.txt`   $server:/backup/user
After the backup is completed,  it creates an AT job to poweroff the backup
server 5 minutes later.


future=$(date -d "5 minutes" | awk '{ print $4 }'| cut -d ':' -f1,2)
ssh [EMAIL PROTECTED] <[EMAIL PROTECTED]>  "echo 'sudo /sbin/ethtool -s eth0 
wol g;
sudo \
/sbin/poweroff' | at $future"

The "ethtool -s eth0 wol g"  command puts the backup server's NIC  in the
proper sleep mode for subsequent remote wake calls.
On Mon, Oct 6, 2008 at 8:10 AM, Umarzuki Mochlis <[EMAIL PROTECTED]> wrote:

> try amanda. Lots of tutorial can be found on it. It needs some sort of
> client to do what you want and a bit of manual configuring for open source
> version.
>
> 2008/10/6 Oliver Friedmann <[EMAIL PROTECTED]>
>
>>
>> I have a debian server at home running 24/7 with a RAID5-solution.
>> Since I don't want to lose any data, I'm looking for a backup
>> configuration that should be working as follows: A second server
>> (which will be called 'backup server' in the following) will be
>> installed so that the main server (that's the other server already
>> running) automatically backups all of its data every two weeks or so
>> (shouldn't be that much of a problem). Additionally I'd like to run
>> the backup server if and only if there is a backup to be made.
>> Obviously it is no problem at all to configure that the backup server
>> wakes up every two weeks - but what should be done thereafter? Should
>> the backup server initiate a backup script and shutdown by itself? Is
>> it possible for the backup server to access all files of the main
>> server without requiring root to enter any passwords (storing a
>> password in a script is obviously no option)? Is that kind of backup a
>> complete nonsensical one? Any helpful suggestions would be really
>> appreciated!
>>
>> Thanks in advance,
>> Oliver
>>
>>
>>
>
>
> --
> Regards,
>
> Umarzuki Mochlis
> http://debmal.com
>
> >
>


-- 
Regards,
Conrad Lawes

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [EMAIL PROTECTED]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---

Reply via email to