[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

rsync remote backup

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
akt-uk
Asked:
akt-uk
  • 2
1 Solution
 
pjedmondCommented:
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
 
akt-ukAuthor Commented:
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
 
pjedmondCommented:
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
 
ppfoongCommented:

Read this for step-by-step instruction.

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


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now