Solved

rsync remote backup

Posted on 2006-06-27
4
307 Views
Last Modified: 2013-12-16
Hi all,

I urgently need assistance with the rync remote backuping up, here's the scenario.

I have a local server with IP 192.168.0.7 and have VPN connection to a remote server with IP 192.168.1.5 and I would like to backup data from local server to remote server.

Both server have rsync installed, i run the following command from the local server where the file i want to back is:

rsync -a /jtest/ 192.168.1.5:/usr/Backup_of_Server2/HD2/ but i get the follwoing error message:
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

Can anyone please help me with this?
0
Comment
Question by:akt-uk
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 500 total points
ID: 16995317
This is because you are not authenticated to use the remote connection. The method of authentication can either be shared 'secrets', or key verification.:

http://www.linuxjournal.com/node/6508/print

gives you a better idea of how to do this.

Assuming that you have sshd on the remote server, then I prefer (as the data is transmitted in encrytped form):

rsync -Cavz -e ssh /home/dir user@192.168.1.5:/home

Will work happily. However, you will need to enter passwords. This can be solved using public key cryptography:

http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/

Incidentally, this is the *correct* way to do it in order to maintain the security of the data transferred.

0
 

Author Comment

by:akt-uk
ID: 16996567
pjedmond, thanks for your support but this is all new to me, we had a consultant come in and he setup the script file which runs daily at 02:00 but i don't think he used the method that you mentioned? how and where can i check on the servers how the system is setup?

which is the best way to to test; i would like to copy a test file on a remote server
 
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16996620
crontab -e

Should show you the cron entry. You can then view the script that is run at 0200 daily once you know what it is.

There may also be a few 'keys' that have been transferred between servers in order to cope with the authentication between the servers.

(   (()
(`-' _\
 ''  ''
0
 
LVL 14

Expert Comment

by:ppfoong
ID: 17040749

Read this for step-by-step instruction.

http://www.fredshack.com/docs/rsync.html


0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Setting up static IP - Ubuntu server 16.04 12 94
awk variable in printf 1 33
How to change the nameserver on Ubuntu Server 6 48
The better OS Architecture 13 64
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question