Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] rsync-server

Featured Replies

  • Author
44 minutes ago, The_Holocron said:

thoughts?

Does this work?

https://community.synology.com/enu/forum/1/post/140590

Quote

This is very well possible. The backup job is started as "root" users on the synology, so the only thing needed is a key pair in ~root/.ssh/

 

To make one, I did as follows:

 

go to Control Panel

select Terminal & SNMP

check "Enable SSH service" (port 22)

Now you SSH to the server and do:

 

use "sudo" to become root

ssh-keygen -t ed25519 #or just run "ssh-keygen" without the ed25519 option

cd to /root/.ssh/ and copy the public key. This is the pub key that the root user is using in Hyper Backup.

To check, you can make a Hyper Backup task with rsync for destination, set the correct server name, set "Transfer encryption" to "on", port to 22 and user name to the user that is going to receive the files. Leave "password" empty and click "shared folder". If everything goes well, the receiving server will have say something like "Accepted publickey for $your-username from $ip-address port $something ssh2: ED25519 SHA256:asdjf298euro23ji4iweuhroweijfaetceteraetceteraetcetera

 

  • 2 weeks later...
  • Replies 58
  • Views 16.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • You can add an infinite amount of keys. There is a loop which reads all of them: https://github.com/eea/eea.docker.rsync/blob/master/docker-entrypoint.sh   By that even SSH_AUTH_KEY_BAN

Posted Images

I'm im the same boat, I am trying to remotely backup a synology dsm 6.2.2 using rsync to my unraid server over the internet. I tried to use the ssh-keygen ed25519, and then use the cat ~/.ssh/id_ed25519.pub command, got the key and put it into rsync docker container as shown, but still no joy.

On DSM 6.2.2 I am getting this when trying, and here is the log when i am trying to connect. Not sure how to move forward at this point, would appreciate any help you could provide. Seems like I am missing just one step.
 

image.png

Screenshot 2024-04-21 151500.png

Hello, I used this container to solve the problem for Synology Hyperbackup (axiom/rsync-server).
I got the container via Docker and adjusted puid/guid, rsync port, user, Pw, mount target to unraid. Ds1019+ Dsm7 worked locally without any problems.
If it doesn't belong here, please move it.

If anyone would like to customize the container "nicely" and put it in the app store, it would definitely be welcome

  • 3 weeks later...

Hello,

i installed the Docker on my unraid mainserver to get access from my unraid backupserver (=client?). I made the ssh key as the instructions say  (on my backupserver) and display the key with command "cat ~/.ssh/id_rsa.pub".
This Key i copied to the docker container, an I tried the dryrun from my backupserver, but it always says connection refused.

root@Backup:~# rsync --dry-run --itemize-changes --archive -e 'ssh -p 5533' root@heimkino:/mnt/user/ /tmp
ssh: connect to host heimkino port 5533: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]

So would could be the problem?

The Container log:

Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
Received signal 15; terminating.
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 
================================================================================
Running: /usr/sbin/sshd -D -e -p 22                                              
================================================================================
================================================================================
Running: /usr/sbin/sshd -D -e -p 22                                              
================================================================================

Thanks in advance. Target is to make backups via ssh and readonly with luckybackup.

Regards Andi

Edited by Augustiner

  • Author

Try the following first:

ssh -p 5533 root@heimkino

 

More output:

ssh -vp 5533 root@heimkino

 

And maybe check if the port is open:

echo "quit" | telnet heimkino 5533

 

 

 

Hello mgutt,

 

thanks a lot for your quick response, unfortunately no results so far:

root@Backup:~# ssh -p 5533 root@heimkino
ssh: connect to host heimkino port 5533: Connection refused
root@Backup:~# ssh -vp 5533 root@heimkino
OpenSSH_9.3p2, OpenSSL 1.1.1v  1 Aug 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to heimkino [192.168.145.51] port 5533.
debug1: connect to address 192.168.145.51 port 5533: Connection refused
ssh: connect to host heimkino port 5533: Connection refused
root@Backup:~# echo "quit" | telnet heimkino 5533
Trying 192.168.145.51...
telnet: connect to address 192.168.145.51: Connection refused

 

Edit:

Generell networksettings are macvlan and eth0 because of using a fritzbox.

Edited by Augustiner

  • Author

So, the answer is simple: Your server is not reachable under port 5533. Did you start the rsync server with the bridge network?

Sometimes its to simple, ssh was deactivted under settings --> management access. 

In the settings was 22 as port set, when use this port 22 in rsync-server its working.

  • Author
31 minutes ago, Augustiner said:

ssh was deactivted under settings --> management access. 

Which has nothing to do with the rsync container. The management access is ssh access to unraid itself. You don't want to use this login as this is the root login to the complete server.

  • 2 weeks later...
On 5/17/2024 at 6:04 PM, mgutt said:

So, the answer is simple: Your server is not reachable under port 5533. Did you start the rsync server with the bridge network?

 

Hi, so i try go further on this problem. Do you mean my unraid server or rsync server is not reacheable on port 5533?

I start the rsync-server with custom:eth0, could possible that i changed to this after installation. Is it normal that the field port mappings (app to host) in the docker tab in the row from rsync-server is empty?

 

Edit:

Do i need a port release in my fritzbox?

Edited by Augustiner

  • 2 months later...

Hi,

since the last update of the rsync-server docker, the client is not able to reach the server with SSH anymore. The key shown under SSH_AUTH_KEY_1 and the key I get with "cat ~/.ssh/id_ed25519.pub" on the client are the same.

But if I run the test "ssh -vp 5533 root@thor***" it returns an error and shows a different fingerprint.

Network in the template is set to bridge.

 

 Bildschirmfoto2024-07-31um09_02_24.thumb.png.92cb6d421df1e3e9d662ba0dafbab733.png

 

This worked for more than a year like a charm till the update.

 

Any suggestions?

 

Thank you very much in advance!

 

I solved it by deleting the entry from known_hosts. But now the question would be if it was safe to do so?

  • 3 weeks later...

Hello,

 

I need help.

The connection from Openmediavault to the Rsync server has been established. Dry run test was successful.

What is the command to start Rsync? Rsync should also delete data that is no longer contained in the source backup.

Edited by Jensus11

How is it possible that data on the client is also deleted? I delete folders on the server, but they remain on the client after resyncing?

 

 

Solution: write "--delete" to the line. 

Edited by Jensus11

  • 4 weeks later...

Hello again,

unfortunately I can't figure out how to get persistent SSH keys for the docker container. Since there are updates to the docker container from time to time it would be good to not have to manually delete the old keys after every update.

On the GitHub page there is a way described to do that, but I don't know how to do it with the Unraid docker?

 

Can anyone tell me how to do that?

 

Thank you very much!

  • 2 weeks later...
On 4/12/2024 at 1:36 PM, mgutt said:

ich möchte auch meine Synology per HyperBackup über RSYNC auf mein unraid sichern und habe dies probiert.

Bekomme auch ein 

Quote

Accepted publickey for root from 192.168.178.2 port 37749 ssh2: RSA SHA256:uy0D/sB1RzM1PekDGYWp3DS2BipqR//d20VJlLDZhO0

oder ein 

Quote

Invalid user <name> from 192.168.178.2 port 45398

wenn ich wie in der Anleitung einen Usernamen verwenden möchte, dem die Dateien am Ende gehören sollen  ("the user that is going to receive the files")

Gut, mit root könnte ich leben ;)

 

Aber ich bekomme den Zugriff aus Hyperbackup nicht hin genauso wie @xerox445:

image.png.48d43dbfa3bda3af1ef1399cd1630487.png

Was ist mit dem Pflichtfeld Backupmodul gemeint? Es scheint sich hier um eine Konfiguration in der rsync.conf zu handeln, die nicht existiert?

Wenn ich oben umstelle von "rsync-kmpatibler Server" auf "Synology Rsync-Server", so benennt sich das Feld um in "Gemeinsamer Ordner" und es kommt die andere Fehlermeldung:

image.png.983f727a240efb99135f806ca6cf8a59.png

 

Ich verwende auf der alten Kiste noch DSM6.2.4

Kann mir jemand weiterhelfen?

  • Author
2 minutes ago, _alo_ said:

Was ist mit dem Pflichtfeld Backupmodul gemeint

Das betrifft nur den Rsync daemon würde ich sagen. Du willst aber rsync über ssh.

4 minutes ago, mgutt said:

Das betrifft nur den Rsync daemon würde ich sagen. Du willst aber rsync über ssh.

Naja, letztlich will ich Daten mit dem HyperBackup-Tool über rsync synchronisieren und dazu einen "Rsync kompatiblen server" auf unraid betreiben ;)

image.png.cfcf8d0138517dde00359625f714b1b9.png 

Bei rsync hab ich dann:

image.png.ed6e2157d80edddc38c23bd98dc0a27a.png

oder 

image.png.59fd5b418e08c74fd65f148f4cff2a97.png

und nach den entsprechenden Anpassungen (laut der Hilfe aus der Synology-Community) dann die o.g. Fehlermeldungen.

 

d.h. dann ich kann deinen Container nicht nutzen, weil hier rsync rein über ssh läuft? :(

 

 

 

  • Author
2 hours ago, _alo_ said:

d.h. dann ich kann deinen Container nicht nutzen, weil hier rsync rein über ssh läuft? :(

Die Optionen bei Syno kenne ich nicht. Ich kann dir nur sagen, dass niemand den Daemon verwendet, weil der unsicher ist (unverschlüsselt) und selten als root läuft (damit man überhaupt alle Rechte 1:1 übernehmen kann).

 

Einfach probieren würde ich sagen.

  • 2 months later...

EDIT: Please disregard this message, my share had reached its "minimum free space" hence writing was no longer possible. I am not deleting my message in case someone else has the same question in the future.

 

 

Hi all,

I am trying to synchronize files between a QNAP NAS (the source) and a new UNRAID box using the rsync-server app.

 

My UNRAID share at /mnt/user/upload has been mounted on the Docker container with the Read/Write option.

 

Unfortunately when I try to write into that directory, via rsync or directly from the container console I get an error which says "no space left on device", despite the fact that there is plenty of space available...

  

Edited by googleg

  • 2 weeks later...

Hello @mgutt,

 

I have installed the rsync-server like you wrote in this topic. When testing it with

 

rsync --dry-run --itemize-changes --archive -e 'ssh -p 5533' root@ip_address:/mnt/user/system/ /tmp

 

I get this error:

 

rsync: [sender] change_dir "/mnt/user/system" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(2006) [Receiver=3.1.2]
rsync: [Receiver] write error: Broken pipe (32)

 

Key was generated on an old Diskstation.

 

I tried some of your suggestions. They seem to work.

 

ssh -p 5533 root@ip_address
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <https://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

 

I can access Unraid via SSH.

 

What am I doing wrong?

Edited by floppy_bl

  • Author
1 hour ago, floppy_bl said:
"/mnt/user/system" failed: No such file or directory (2)

Did you pass this directory to the container? Try to open the command line of the container and use this command to output all available directories:

 

find / -type d

22 hours ago, mgutt said:

Did you pass this directory to the container? Try to open the command line of the container and use this command to output all available directories:

 

find / -type d

I tried this and get a bunch of directories. Also /mnt/user/system is in the list as all of my other shares.

Edited by floppy_bl

@mgutt

I tried the following command:

 

rsync --dry-run --itemize-changes --archive -e 'ssh -p 22' root@ip_address:/mnt/user/system/ /tmp

 

After entering my root password from Unraid it shows a lot of files beginning with f++++++. Could this be correct? I mean entering the password is not the right way. Or what do you think?

@mgutt

Finally I did it now. Problem was that the system share was not public. Tried it with some other shares and now the dry run works like charm.

 

Next step was to put your incremental script into the scheduler of the Diskstation. After I changed the directories in your script I get this error:

 

# #####################################
&gt;f+++++++++ empty.file
removed '/tmp/_volume1_homes_backup_scripts_incbackup.sh/empty.file'
*deleting   link_dest/empty.file
*deleting   link_dest/
Create full backup from root@ip_address:/mnt/user/Public to /volume1/backup/Public/20250115_220334
Permission denied, please try again.
Received disconnect from ip_address port 22:2: Too many authentication failures
Disconnected from ip_address port 22
rsync error: unexplained error (code 255) at io.c(254) [Receiver=3.1.2]
File count of rsync is 0
Error: Received disconnect from ip_address port 22:2: Too many authentication failures  rsync error: unexplained error (code 255) at io.c(254) [Receiver 3.1.2] (255)!
# #####################################
Clean up outdated backups

 

Do I need to put the port from your rsync-server (5533) somewhere in your script? Or is there anything else to do? 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.