Author Topic: scp backup will not run  (Read 4254 times)

ArchWill

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
scp backup will not run
« on: January 31, 2010, 08:44:01 pm »
I am using the most recent version marked "Core version      1.3.16 "

Any time I try to set ebox backup to run via scp I get a mail to the ebox user titled "/usr/share/ebox-ebackup/ebox-remote-ebackup --full" and it says:

root command /usr/share//ebox-ebackup/ebox-duplicity-wrapper remove-older-than 1D
--force scp://eboxuser@192.168.1.105 --ssh-askpass --no-encryption failed.
Error output: Host
key authenticity could not be verified (missing known_hosts entry?)
 Running 'sftp  eboxuser@192.168.1.105' failed (attempt #5)
 Giving up trying to execute 'sftp  eboxuser@192.168.1.105' after 5 attempts
 Traceback (most recent call last):
   File "/usr/bin/duplicity", line 463, in <module>
     with_tempdir(main)
   File "/usr/bin/duplicity", line 458, in with_tempdir
     fn()
   File "/usr/bin/duplicity", line 390, in main
     globals.archive_dir).set_values()
   File "/usr/lib/python2.5/site-packages/duplicity/collections.py", line 476, in
set_values
     backend_filename_list = self.backend.list()
   File "/usr/lib/python2.5/site-packages/duplicity/backends.py", line 504, in list
     l = self.run_sftp_command(commandline, commands).split('\n')[1:]
   File "/usr/lib/python2.5/site-packages/duplicity/backends.py", line 473, in run_sftp_command
     raise BackendException("Error running '%s'" % commandline)
 duplicity.backends.BackendException: Error running 'sftp  eboxuser@192.168.1.105'

Command output: .
Exit value: 1

I have tried running "sudo /usr/share/ebox-ebackup/ebox-remote-ebackup --full" from the command line but it gives the same error

Any ideas?

Thanks!

Arch

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: scp backup will not run
« Reply #1 on: January 31, 2010, 09:51:40 pm »
What is the version of the backup module (apt-cache policy ebox-ebackup) ?

Try to upgrade it if you have 1.3.13 or lower.
Zentyal Server Lead Developer

ArchWill

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: scp backup will not run
« Reply #2 on: February 01, 2010, 03:15:38 am »
Here is the output:


user@firewallsrvr:~$ apt-cache policy ebox-ebackup
ebox-ebackup:
  Installed: 1.3.15-0ubuntu1~ppa1~hardy1
  Candidate: 1.3.15-0ubuntu1~ppa1~hardy1
  Version table:
 *** 1.3.15-0ubuntu1~ppa1~hardy1 0
        500 http://ppa.launchpad.net hardy/main Packages
        100 /var/lib/dpkg/status


Arch

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: scp backup will not run
« Reply #3 on: February 01, 2010, 05:09:43 pm »
The problem is that your ssh configuration does not have the destination host key as know key.

To remedy this:
 1) do a ssh against the destination  as root user:  ('sudo ssh eboxuser@192.168.1.105')
 2) When the prompt asks you to add the destination's key to the lsit of know host say 'yes'
 3) Once the key is added you can exit the ssh process, then you can retry the backup

(Edited to put in Javi's simpler solution)
« Last Edit: February 02, 2010, 01:07:57 pm by Javier Amor Garcia »

ArchWill

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: scp backup will not run
« Reply #4 on: February 01, 2010, 07:51:20 pm »
I tried the first step an dgot this:

$ chsh -s /bin/bash ebox
You may not change the shell for ebox.

I wasnt sure if I was supposed to put sudo in front of it so I tried it that way too. This time I did that and got this

~$ sudo chsh -s /bin/bash ebox                                   
~$

I have nbot idea if that was right so I ekpt on going.

1. I did this: ('ssh eboxuser@192.168.1.105') and it let me do it once but from then on it gave me the error "ssh_exchange_identification: Connection closed by remote host". On the other machine I can see it log this:

Feb  1 13:46:54 backupserver sshd[3602]: refused connect from 192.168.1.106 (192.168.1.106)


2. On the first run, it gave the same error message as I alluded to earlier.

Arch



javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: scp backup will not run
« Reply #5 on: February 01, 2010, 08:45:06 pm »
Run this:

Code: [Select]
sudo ssh user@host

And press yes when asked.

ArchWill

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: scp backup will not run
« Reply #6 on: February 01, 2010, 09:06:21 pm »
That worked!!

That gave me the message below for the first time!

The authenticity of host '192.168.1.105 (192.168.1.105)' can't be established.
RSA key fingerprint is 0b:43:d4:42:9c:90:cd:f3:64:8e:11:5d:55:3e:a4:4d.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.1.105' (RSA) to the list of known hosts.


I let 3:00 go by (when I have sit set to run by itself) and I just checked and there are a ton of 5mb files sitting on that computer like this:
duplicity-full.2010-02-01T14:52:35-05:00.manifest
duplicity-full.2010-02-01T14:52:35-05:00.vol100.difftar.gz

Now for the next dumb question. Is there any way to tell the other machine what directory you want the backups stored on?




Arch

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: scp backup will not run
« Reply #7 on: February 02, 2010, 12:54:37 pm »
Sorry about the forgottenm 'sudo'...

To specify a directory you must put in the "target" field something along those lines:
192.168.1.105/path_to_dir

ArchWill

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: scp backup will not run
« Reply #8 on: February 12, 2010, 04:19:02 pm »
Thanks!