Solved

rsync remote backup

Posted on 2006-06-27
4
308 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rate limit for DNS queries 7 93
Ubuntu Apache Webserver - File Permissions 5 76
ignore other .htaccess 2 70
Linux Real Time Memory on Distinct 24 Cycle 7 44
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

733 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