[EMAIL PROTECTED] writes:

> I have a need to wake up some Windows PC's at night to backup so as to
> reduce network traffic during the day. I am using SMB.
>
> So far, my conf.pl has the $Conf{DumpPreUserCmd} pointing to a script
> that wakes up the PC and then sleeps for 2 minutes. This script works
> from the command line just fine under the same user that backuppc runs
> as. However, when I try to use it within backuppc, it comes back with
> this error:
>
> "Can't find host [hostname] via netbios".
>
> The DumpPreUserCmd does not even seem to run.
>
> The DumpPostUserCmd runs just fine, and when I kick off a backup
> when the machine is already on, the backup finishes and the PC
> turns itself off.

The problem is that DumpPreUserCmd is run after the machine's
ip address is looked up via netbios.  BackupPC_dump needs to
find the ip address first.  It tries DNS first.  Failing that,
it runs $Conf{NmbLookupFindHostCmd}.  After that it runs
$Conf{PingCmd}.  If that passes, just before the dump starts
it runs $Conf{DumpPreUserCmd}.

You can either put your IP address in DNS (and disable $Conf{PingCmd}
by setting it to, eg, /bin/true).

Or another solution is to move your script from $Conf{DumpPreUserCmd}
to $Conf{NmbLookupFindHostCmd}.  The end of your script should run
the original $Conf{NmbLookupFindHostCmd} command (after the power up
is done).  Since BackupPC_dump parses the output of
$Conf{NmbLookupFindHostCmd} to find the IP address, be careful that
your script doesn't generate extra output that confuses the parsing.

Craig


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to