Hi,
Les Stott wrote on 25.04.2007 at 16:50:52 [Re: [BackupPC-users] Shutdown
BackupPc server after backup]:
> Alessandro Ferrari wrote:
> > Yes, It is a stupid question... such as my client's stupid question....
sometimes you have to tell a client that his question is stupid (in a
diplomatic way, of course :). Clients often think they want things, which,
if they actually understood what they want, they wouldn't want to want.
> > Therefore, is it possible?
> Yes its possible.
>
> two ways.
>
> 1. DumpPostUserCmd (with a suitable script or command, but you'll likely
> need sudo to help out)
I believe it's not that simple. If you really want to have *BackupPC*
running and not just a somewhat complicated emulation of a rather stupid tar
or rsync cronjob, then you'll need to make sure of two things:
1. for each successful backup, BackupPC_link is run and
2. BackupPC_nightly is run regularly.
If that doesn't happen, then pooling won't work (at least for new files,
which means "never" if BackupPC_link is never run), and backups won't
expire.
Aside from that, on a specific day BackupPC might decide *not* to backup your
host, which would mean the DumpPostUserCmd is also not run.
Actually, using DumpPostUserCmd would really mean you've got a dedicated
backup server machine to backup one single host, but you're not willing to
keep it running outside of backup times. Note that there's not really any
guarantees about the order backups for distinct hosts are run in (aside from
maybe some tweaking with distinct blackout periods), so if you were to backup
several hosts, you couldn't simply "let the last one turn off the light"
when it's finished, because there is no defined "last one".
> 2. run a cron job to shutdown backuppc at a specified time.
That would help in so far as you could allow for some time to run
BackupPC_link. You'd need to have a good estimate of how long your actual
backup(s) and BackupPC_link processes run though. Interrupting a backup in
progress by shuting down the backup server machine is quite pointless. I'm
not sure how happy BackupPC_link would be to be interrupted. It probably
needs to be able to cope, but that doesn't mean it would be a good thing to
test it on a regular basis :).
If I were forced to really do such a thing, I'd change BackupPC to handle it
after completing the last scheduled wakeup. BackupPC has control over which
processes are running and can make sure you're not interrupting backups or
links. You'd define your WakeupSchedule as eg. [0, 22, 23, 1] meaning "run
BackupPC_nightly at 0:00, do backups at 22:00, 23:00 and 01:00 and then
run $Conf{ShutdownCmd} after running all 01:00 backups and their
corresponding BackupPC_link (as well as any backups from earlier wakeups
that are still running)". That's non-trivial, but at least it would make
sure that the main purpose of your BackupPC server was to run backups and
not to power itself down.
Note that your users will need physical access to the machine's power switch
(or wake on lan capability) if they are to restore files autonomously.
Regards,
Holger
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/