LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2017, 10:41 AM   #1
sparkling
LQ Newbie
 
Registered: Apr 2017
Posts: 13

Rep: Reputation: Disabled
Rsync files from a remote machine into another remote machine (Indirectly)


Hi all,

I am trying to backup the files from a server's /home/user directory into my backup machine. So we call the VM where the files are "server" and the one that is supposed to keep the backed-up files "my-backup".

My local workstation is able to SSH to both pf these machine (server and backup) I need to run the rsync command to backup the files on server VM onto /srv/backup directory of my-backup machine. This is how I've done it but didn't work:

Code:
ssh -o StrictHostKeyChecking=no -R 50000:my-backup:22 server 'rsync -e "ssh  -o StrictHostKeyChecking=no -p 50000" -vuar /home/user localhost:/srv/backup'
Error:
Code:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]
Any help would be much appreciated.
 
Old 04-27-2017, 11:36 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,634

Rep: Reputation: 109Reputation: 109
ssh into one of the machines run the rsync command then logout once done. Also the /home/user localhost:/srv/backup part does not look right backing up to the /home/user localhost:/srv/backup/ should allow the /home/user directory to be backed up into the /srv/backup directory the original command leaves it no where to backup to.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP: Get count of files on a remote machine directory to the source Linux machine mamu Linux - Newbie 3 10-28-2011 04:10 PM
How to change a line in a file and send to a remote machine with rsync danndp Linux - Server 4 11-20-2010 11:34 AM
rsync not deleting folders on remote machine alexandersv Linux - Software 2 09-03-2008 10:15 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 12:14 PM
rsync Syntax Question for Connecting to Remote Windows Machine Linux31 Linux - Networking 3 10-09-2005 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration