Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-27-2017, 11:41 AM   #1
LQ Newbie
Registered: Apr 2017
Posts: 20

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:

ssh -o StrictHostKeyChecking=no -R 50000:my-backup:22 server 'rsync -e "ssh  -o StrictHostKeyChecking=no -p 50000" -vuar /home/user localhost:/srv/backup'
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, 12:36 PM   #2
Senior Member
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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.


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 05: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 12:34 PM
rsync not deleting folders on remote machine alexandersv Linux - Software 2 09-03-2008 11:15 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 01:14 PM
rsync Syntax Question for Connecting to Remote Windows Machine Linux31 Linux - Networking 3 10-09-2005 03:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:16 AM.

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