Glad you got it working.  Once I saw Marki’s reply, I knew he probably had
the correct solution.



Jeff West

Systems Engineer

Riptide Software

Office 321-296-7724 ext 216

Direct 407-542-7697

Cell    407-925-7030

www.riptidesoftware.com



*From:* marki <backuppc-us...@lists.roth.lu>
*Sent:* Friday, November 8, 2019 4:37 PM
*To:* Derek Stevens <drk...@zoho.com>; backuppc-users@lists.sourceforge.net
*Subject:* Re: [BackupPC-users] Host key verification failed



Gladly.

But this has nothing to do with "routing".
So "freenas" even resolves to a different IP? I believe even if it resolved
to the provided IP, SSH might still make a difference between using the
hostname and the IP, so there you go ;)

On November 8, 2019 10:12:16 PM GMT+01:00, Derek Stevens <drk...@zoho.com>
wrote:

Ok, so for whatever reason the freenas hostname in our network doesn't
route to this IP, so I removed the alias and everything is working now
(after setting RsyncClientCmd to the correct path).

Thanks for helping me figure out where the problem was! I appreciate it!

On 11/8/19 3:21 PM, marki wrote:

 Are you using the IP address 192.168.... and the host name (freenas)
 interchangeably?

 Try sshing into the client using both please. Even though it's the
 same host, ssh doesn't treat it as such automatically I guess.

 On November 8, 2019 8:33:25 PM GMT+01:00, Derek Stevens
 <drk...@zoho.com> wrote:

     Marki,

     When I say "to the client from the server" I mean that am initiating SSH
     and Rsync from the BackupPC server to the backup client.

     I agree that it makes no sense, that's why I'm stumped and I'm writing you.

     Here's an ssh into the backup client:
     # su backuppc
     [backuppc@piholeserver nilix]$ ssh root@192.168.14.149
     Last login: Fri Nov  8 11:41:30 2019 from 192.168.14.176
     FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+3b66a34f3aa(HEAD): Wed
     Feb 27 14:31:54 EST 2019

               FreeNAS (c) 2009-2019, The FreeNAS Development Team
               All rights reserved.
               FreeNAS is released under the modified BSD license.

               For more information, documentation, help or support, go here:
               http://freenas.org
     Welcome to FreeNAS

     Warning: settings changed through the CLI are not written to
     the configuration database and will be reset on reboot.

     root@freenas[~]#


     Here is an rsync from the BackupPC server, copying a file from the
     client onto the server:
     [backuppc@piholeserver ~]$ rsync
     root@192.168.14.149:/mnt/MandA-Server-Pool-1/Shop-Dataset/xkcd/h
     ard_reboot.png ./
     [backuppc@piholeserver ~]$ ls
     dead.letter  hard_reboot.png

     Here is the config for the client:

     $Conf{ClientNameAlias} = [
         'freenas'
     ];
     $Conf{PingMaxMsec} = 300;
     $Conf{RsyncShareName} = [
         '/mnt/MandA-Server-Pool-1/Shop-Dataset'
     ];
     $Conf{XferMethod} = 'rsync';
     $Conf{RsyncSshArgs} = [
         '-e',
         '$sshPath -i ~/.ssh/id_rsa -l root'
     ];
     $Conf{XferLogLevel} = 5;

     And lastly, here is the log from the failed XFER

     XferLOG file /media//pc/192.168.14.149/XferLOG.0.z created
2019-11-08 19:21:54
     Backup prep: type = full, case = 1, inPlace = 1, doDuplicate = 0,
newBkupNum = 0, newBkupIdx = 0, lastBkupNum = , lastBkupIdx =
(FillCycle = 0, noFillCnt = )
     Running: /usr/local/bin/rsync_bpc --bpc-top-dir /media/
--bpc-host-name 192.168.14.149 --bpc-share-name
/mnt/MandA-Server-Pool-1/Shop-Dataset --bpc-bkup-num 0 --bpc-bkup-comp
3 --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2
--bpc-attrib-new --bpc-log-level 5 -e /usr/bin/ssh\ -i\ ~/.ssh/id_rsa\
-l\ root --super --recursive --protect-args --numeric-ids --perms
--owner --group -D --times --links --hard-links --delete
--delete-excluded --one-file-system --partial --log-format=log:\ %o\
%i\ %B\ %8U,%8G\ %9l\ %f%L --stats --checksum --timeout=72000
freenas:/mnt/MandA-Server-Pool-1/Shop-Dataset/ /
     full backup started for directory /mnt/MandA-Server-Pool-1/Shop-Dataset
     Xfer PIDs are now 11698
     This is the rsync child about to exec /usr/local/bin/rsync_bpc
     bpc_attrib_backwardCompat: WriteOldStyleAttribFile = 0,
KeepOldAttribFiles = 0
     Host key verification failed.
     rsync_bpc: connection unexpectedly closed (0 bytes received so
far) [Receiver]
     bpc_sysCall_cleanup: doneInit = 1
     Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0
filesTotal, 0 sizeTotal, 0 filesNew, 0 sizeNew, 0 sizeNewComp, 2 inode
     Parsing done: nFilesTotal = 0
     rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.2.1]
     rsync_bpc exited with fatal status 255 (65280) (rsync error:
unexplained error (code 255) at io.c(226) [Receiver=3.1.2.1])
     Xfer PIDs are now
     Got fatal error during xfer (No files dumped for share
/mnt/MandA-Server-Pool-1/Shop-Dataset)
     Backup aborted (No files dumped for share
/mnt/MandA-Server-Pool-1/Shop-Dataset)
     BackupFailCleanup: nFilesTotal = 0, type = full, BackupCase = 1,
inPlace = 1, lastBkupNum =
     Removing empty backup #0
     Xfer PIDs are now 11704
     BackupPC_backupDelete: removing #0
     BackupPC_backupDelete: No prior backup for merge
     Xfer PIDs are now 11704,11705
     BackupPC_refCountUpdate: computing totals for host 192.168.14.149
     BackupPC_refCountUpdate: host 192.168.14.149 got 0 errors (took 0 secs)
     BackupPC_refCountUpdate total errors: 0
     Xfer PIDs are now 11704
     BackupPC_backupDelete: got 0 errors
     Xfer PIDs are now
     Finished BackupPC_backupDelete, status = 0 (running time: 2 sec)
     Xfer PIDs are now
     Running BackupPC_refCountUpdate -h 192.168.14.149 -f on 192.168.14.149
     Xfer PIDs are now 11706
     BackupPC_refCountUpdate: computing totals for host 192.168.14.149
     BackupPC_refCountUpdate: host 192.168.14.149 got 0 errors (took 0 secs)
     BackupPC_refCountUpdate total errors: 0
     Xfer PIDs are now
     Finished BackupPC_refCountUpdate (running time: 1 sec)
     Xfer PIDs are now

     On 11/8/19 1:50 PM, marki wrote:

         You write "to the client from the server". You probably mean
         from the client to the server. Also, the host key of the
         server is stored in known_hosts, it's not the same as the
         identity key used for auth. Read up on ssh. I makes no sense
         to fail when you run it via backuppc when it does not fail
         when run manually. Probably you are not describing exactly
         what you do therefore could you please post output from your
         console session with the appropriate errors. It's not an
         actual backuppc problem. On November 8, 2019 7:15:00 PM
         GMT+01:00, Derek Stevens <drk...@zoho.com> wrote: Hi Marki,
         I'm running both as the same user, backuppc, who has the
         appropriate id_rsa in ~/.ssh/ Derek On 11/8/19 1:06 PM, marki
         wrote: Are you running your manual SSH session using the same
         user backuppc runs as? On November 8, 2019 6:26:08 PM
         GMT+01:00, Derek Stevens via BackupPC-users
         <backuppc-users@lists.sourceforge.net> wrote: Hello BackupPC
         users, I am coming to you guys with a problem I've been having
         trying to set up a client backup with the Rsync method and an
         SSH key. I am able to SSH and Rsync to the client from the
         server on the command line using the SSH key, and the server
         is in the client's known_hosts file. But when doing a backup,
         the transfer always fails with the error "host key
         verficiation failed." RsyncSshArgs is: ['-e', '$sshPath -i
         ~/.ssh/id_rsa -l root'] Is there a secret argument I'm not
         passing? If it helps, the BackupPC server is an RPi3 running
         Void Linux, and the Client to backup is running FreeNAS 11.
         Cheers, Derek
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to