auto-powerup,run backup,shutdown?

Charles Mauch cmauch at taclug.org
Thu Jul 14 23:52:49 UTC 2005


This one time, in band camp, Lee Braiden said:

>I have a big, noisy machine that I don't like to leave running.  However, I 
>*do* want to use it as a scheduled backup server.
>
>So, I'm thinking I can have it start up automatically at certain times of the 
>day using the bios alarm, then run a backup script, and shutdown again.
>
>Does anyone have an idea of how to do this?  The best thing I can think of so 
>far is to just shutdown after doing the scheduled backup, if the time is in a 
>certain range (at night, for instance).

As long as the backup script is run as root, you could simply
append "shutdown now -hP" to the end of your backup script.

If the backup is being run to backup files *to* your backup
server, you could write a short bash script to check for the
existence of new backup files or a 'timestamp' file created by
your backup script touching a particular file, and if the
date/time matches correctly - shut down the machine.

You could have cron run this script periodically, or simply make
it a part of the boot process and run it in a loop with a 5
minute sleep interval or something.

Just some ideas offhand.  Let us know how you decide to get this
working.  I'm sure a bunch of us would love to help if you run
into scripting trouble. :)

-- 
Take it easy, [cmauch at taclug.org]

Charles Mauch, FSF Apologist, Debian/Ubuntu/Gentoo user, etc.
Every message PGP or S/MIME signed to verify authenticity.
-------------------------------------------------------------
Playing "Chime" by Orbital (Orbital)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050714/d135f950/attachment.sig>


More information about the ubuntu-users mailing list