15
submitted 5 hours ago* (last edited 5 hours ago) by Donatello@lemmy.ml to c/linux@lemmy.ml

Hi,

I need to setup a Rsync server to backup a 😡 NAS.

So I want to run it under SSH.

man rsync

Also note that the rsync daemon protocol does not currently provide any encryption of the data that is transferred over the connection. Only authentication is provided. Use ssh as the transport if you want encryption.

but when I do rsync --config=/etc/rsyncd.conf --rsh=ssh --dry-run
I get:

rsync: --rsh=ssh: unknown option (in daemon mode) So there no way to specify that rsync daemon should run under ssh ?

Also is this following A.I statement is correct ?

The rsyncd.conf file is only used when the rsync daemon is running on the remote host and the client connects to the daemon directly, without using an SSH connection.

So there is no way with Rsync (under ssh) to set settings (config file or other) that will apply to all clients !!??
So it's the client that configure rsync and the server !? there is no way around ?!

top 5 comments
sorted by: hot top controversial new old
[-] IsoKiero@sopuli.xyz 2 points 1 hour ago

The statement is correct, rsync by itself doesn't use ssh if you run it as an daemon and if you trigger rsync over ssh then it doesn't use daemon but instead starts rsync with UID of the ssh-user.

But, you can run rsyncd and bind it only to localhost and connect to that over ssh-tunnel. That way you can get benefits of rsync daemon and still have encrypted connection with ssh.

[-] ReversalHatchery@beehaw.org 2 points 1 hour ago* (last edited 1 hour ago)

I think you don't need to specify that you want to use SSH. unless you give the location as starting with rsync://, or set to use the rsh protocol, it should use ssh by default.
just use user@targethost:path. The part before : is the same as what you use in SSH, and the part after it may be an absolute or a relative (to user home) path

[-] matcha_addict@lemy.lol 1 points 1 hour ago

So there is no way with Rsync (under ssh) to set settings (config file or other) that will apply to all clients !!??
So it's the client that configure rsync and the server !? there is no way around ?!

You basically want to use the daemon but under ssh. I looked into this before, and I think it is possible but the command for it is weird and confusing. Wish I remembered it, but just commenting to say that I vaguely remember there's a way (or maybe I'm hallucinating).

[-] tenchiken@lemmy.dbzer0.com 16 points 5 hours ago

So... As long as you have ssh running open on the receiving server, you don't need the rsync daemon. Rsync client will ssh, then execute rsync recipient automatically.

The daemon is only for if you don't want to or cannot run ssh really.

Is there a specific reason you are looking at the daemon, or just unfamiliar?

[-] HauntingScience@programming.dev 2 points 4 hours ago

Using the daemon also allows you to transfer faster by removing compression and encryption. It tends to hit the same rclone speeds without the data corruption issues.

this post was submitted on 24 Nov 2024
15 points (100.0% liked)

Linux

48334 readers
1140 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS