Post by Papp TamasPost by Gabriel RossettiHello everyone,
I read up on how BackupPC finds hosts, in my case nmblookup works. The
problem is that when it tries to run the ssh command, it uses the host's
name and not the IP it finds with nmblookup, so ssh exits complaining it
can't find the host. How can I get BackupPC to use the IP found using
nmblookup? I thought it would automatically do this since it can't
resolve it directly, but I guess not.
hi Gabriel,
If I understand you well, you want to set ClientNameAlias .
tamas
Hi Tamas,
not really, I must not have explained myself correctly. I have a local
network with a server that backs up our laptops. The laptops use DHCP to
get their IPs, they are Macs and Linux laptops. For my example I will
use a notebook called "myNotebook". It can't be resoved using DNS
resolution, but nmblookup can find it. The problem is that although
nmblookup finds it, when the backup script tries to ssh on to that
notebook it can't find the host because instead of using the IP it uses
the client/host name. Here is the output of BackupPC_dump, maybe that
will help to understand the problem:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
$ /usr/share/backuppc/bin/BackupPC_dump -v -f myNotebook
Name server doesn't know about myNotebook; trying NetBios
cmdSystemOrEval: about to system /usr/bin/nmblookup myNotebook
cmdSystemOrEval: finished: got output querying myNotebook on 192.168.0.255
querying myNotebook on 192.168.1.255
192.168.1.69 myNotebook<00>
NetBiosHostIPFind: found IP address 192.168.1.69 for host myNotebook
cmdSystemOrEval: about to system /bin/ping -c 1 192.168.1.69
cmdSystemOrEval: finished: got output PING 192.168.1.69 (192.168.1.69)
56(84) bytes of data.
64 bytes from 192.168.1.69: icmp_req=1 ttl=64 time=12.3 ms
--- 192.168.1.69 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 12.382/12.382/12.382/0.000 ms
cmdSystemOrEval: about to system /bin/ping -c 1 192.168.1.69
cmdSystemOrEval: finished: got output PING 192.168.1.69 (192.168.1.69)
56(84) bytes of data.
64 bytes from 192.168.1.69: icmp_req=1 ttl=64 time=4.44 ms
--- 192.168.1.69 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.448/4.448/4.448/0.000 ms
CheckHostAlive: returning 4.448
cmdSystemOrEval: about to system /usr/bin/nmblookup -A 192.168.1.69
cmdSystemOrEval: finished: got output Looking up status of 192.168.1.69
myNotebook <00> - B <ACTIVE>
myNotebook <03> - B <ACTIVE>
myNotebook <20> - B <ACTIVE>
..__MSBROWSE__. <01> - <GROUP> B <ACTIVE>
WORKGROUP <1d> - B <ACTIVE>
WORKGROUP <1e> - <GROUP> B <ACTIVE>
WORKGROUP <00> - <GROUP> B <ACTIVE>
MAC Address = 00-00-00-00-00-00
NetBiosInfoGet: success, returning host myNotebook, user myNotebook
full backup started for directory /etc
started full dump, share=/etc
Running: /usr/bin/ssh -x -l root myNotebook /usr/bin/rsync --server
--sender --numeric-ids --perms --owner --group -D --links --hard-links
--times --block-size=2048 --recursive --ignore-times . /etc/
Xfer PIDs are now 21437
xferPids 21437
Got remote protocol 979923827
Fatal error (bad version): ssh: Could not resolve hostname myNotebook:
Name or service not known
Can't write 4 bytes to socket
fileListReceive() failed
Done: 0 files, 0 bytes
Got fatal error during xfer (fileListReceive failed)
Backup aborted by user signal
Not saving this as a partial backup since it has fewer files than the
prior one (got 0 and 0 files versus 0)
dump failed: fileListReceive failed
----------------------------------------------------------------------------------------------------------------------------------------------------------------
I would have thought that BackupPC would have used the IP address
instead of the client/host name when it can't be resolved using DNS
resolution, but this is not the case it seems. Does anyone know how I
can set this up so that our laptops can be backed up and still use
dynamic IPs (and thus be referred to by host name)?
Thank you,
Gabriel