LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-23-2019, 11:21 AM   #1
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Arrow How to Transfer Files with Rsync over SSH


Hi,

If you need to transfer files, directory or data over the network then;

How to Transfer Files with Rsync over SSH
Quote:
When it comes to transferring files between systems on the network, Linux and Unix users have a lot of tools at their disposal.
The most popular protocols for data transfer are SSH and FTP. While FTP is very popular, always prefer using SSH as it is the most secure way to transfer your files.
There are specialized tools for file transfer over SSH such as scp and sftp but none of them has all the features that rsync provides. rsync can be used for mirroring data, incremental backups, copying files between systems and so on.
In this tutorial, we will explain how to copy files with rsync over SSH.
Very useful information!
Hope this helps.
Have fun & enjoy Linux!
 
Old 08-23-2019, 09:18 PM   #2
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
what if you are doing this to make a backup of your system files from your laptop or home computer to a remote server and you can access root only with sudo (direct root login is disabled for security)? let's see if you can explain how to do that. the linked article didn't.
 
Old 08-23-2019, 09:33 PM   #3
permaroot
Member
 
Registered: Aug 2019
Location: Arden, NC
Distribution: Arch Linux
Posts: 129

Rep: Reputation: 48
Quote:
Originally Posted by Skaperen View Post
what if you are doing this to make a backup of your system files from your laptop or home computer to a remote server and you can access root only with sudo (direct root login is disabled for security)? let's see if you can explain how to do that. the linked article didn't.
Put sudo in front of the rsync command
 
Old 08-23-2019, 10:45 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925

Original Poster
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member Response

Hi,

Quote:
Originally Posted by Skaperen View Post
what if you are doing this to make a backup of your system files from your laptop or home computer to a remote server and you can access root only with sudo (direct root login is disabled for security)? let's see if you can explain how to do that. the linked article didn't.
You must have missed this in the article;
Quote:
The user running the rsync command and the remote SSH user must have appropriate permissions to read and write files.
Hope this helps.
Have fun & enjoy!
 
1 members found this post helpful.
Old 08-23-2019, 11:24 PM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,335
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
Quote:
Originally Posted by Skaperen View Post
what if you are doing this to make a backup of your system files from your laptop or home computer to a remote server and you can access root only with sudo (direct root login is disabled for security)? let's see if you can explain how to do that. the linked article didn't.
You'd have to use an option to set --rsync-path="sudo rsync" on the end which initiates the connection. Then on the remote end you need to lock down /etc/sudoers appropriately. Not hard, just detailed.
 
  


Reply

Tags
data, files, rsync+ssh, scp, sftp



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slow transfer speeds when rsync'ng files over network? MikeyCarter Linux - Software 4 08-28-2017 02:46 PM
rsync over ssh VS rsync.d RISKS tripialos Linux - Security 4 02-20-2013 06:22 PM
Rsync server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 12:10 PM
Can you transfer files over ssh? Thaidog Linux - Software 2 04-08-2004 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:35 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
Open Source Consulting | Domain Registration