At 16:13 +0000 22/01/03, <jpuderer@...> wrote:
>- BackupPC only resolves hosts using nmblookup if they are specified
>as dynamic hosts in the hosts configuration file. This doesn't seem
>to account for those cases where a host is resolvable only through
>nmblookup, but has been assigned a static IP address (I know it
>would be a weird case where the host address is static, but cannot
>be resolved through other means)
me too! 8) I also think that this is a weird way of doing things. The
easy solution for me was to put the NMB names of each static-ip host
and their ip addresses in /etc/hosts on the BackupPC server host. But
I would prefer to have a more "natural" way of doing things.
Logidac Tech., Beaumont, Qu=E9bec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/
> - BackupPC only resolves hosts using nmblookup if they are specified
> as dynamic hosts in the hosts configuration file. This doesn't
> seem to account for those cases where a host is resolvable only
> through nmblookup, but has been assigned a static IP address (I
> know it would be a weird case where the host address is static,
> but cannot be resolved through other means)
> - Why does BackupPC check a range of DHCP addresses? Wouldn't it
> be easier and more efficient to simply try to resolve the netbios
> names for those hosts that have dynamically assigned addresses?
> This seems especially true since BackupPC_dump fails if an IP
> address cannot be mapped to a netbios name using 'nmblookup -A
> $hostIP' or is not configured in the hosts file.
> - It seems to me that if a static host exists in the DHCP range,
> BackupPC will try to back it up twice. Once as a so-called
> dynamic host and then as a static host.
You're right on all counts. The last point is probably a benign
issue, since the second attempt will do nothing (beacause of
IncrPeriod/FullPeriod) once the first one finishes its dump.
Frankly, I didn't know much about nmb and nmblookup when I wrote this
code. I wasn't aware that it can do a multicast request and resolve a
name directly. Stepping through all the DHCP addresses, running ping
and nmblookup on an IP address was the best I could come up with at
the time. All this code should be ripped out.
In general, the notion of host, dynamic ip addresses etc should be
generalized, so that multiple backup "clients" can map to a particular
physical machine (allowing several separate parts of the system to
be backed up with different settings), and that machine can be
identified by several means, either hostname (whose ip address
can be looked up), ip address, or netbios name. The whole notion
of DHCP should go away.
If you want to sign up to do this, let's talk about it a litte more.