Synology Hyper Backup backup to Ubuntu rsync: module configuration, testing and troubleshooting

This article introduces the complete configuration of backing up Synology Hyper Backup to Ubuntu rsync daemon: creating modules, authentication accounts, firewalls, connection tests, and how to fill in each field on the Hyper Backup page.

The other device is just an Ubuntu server and has rsync installed. This does not mean that it can be directly used as the target of Hyper Backup. When Hyper Backup uses the normal rsync protocol, it needs to connect to the rsync daemon running on Ubuntu; the daemon must also define a writable module.

The most common item to fill in incorrectly is “shared folder”: it is not the absolute path of Ubuntu, but the module name defined by square brackets in /etc/rsyncd.conf. This article takes writing the backup to Ubuntu’s /srv/hyperbackup as an example to explain the complete process from server configuration to Synology verification.

First clarify the target type of Hyper Backup

When creating a new data backup task in Hyper Backup, if the target is not Synology, do not select “Synology rsync server”. Instead, select:

1
rsync 兼容服务器

This article uses rsync daemon mode, and the default TCP port is 873. It is suitable for trusted LAN; if you want to transmit across public networks, give priority to using VPN, Tailscale or SSH encryption solutions, and do not expose 873 directly to the Internet.

Prepare the directory and running account on the Ubuntu side

After logging in to Ubuntu, install rsync and create a system account that does not allow login and is only used for writing to the backup directory:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sudo apt update
sudo apt install -y rsync

sudo useradd --system \
  --home /nonexistent \
  --shell /usr/sbin/nologin \
  rsyncbackup

sudo mkdir -p /srv/hyperbackup
sudo chown -R rsyncbackup:rsyncbackup /srv/hyperbackup
sudo chmod 750 /srv/hyperbackup

Here rsyncbackup is the account used by the rsync daemon when writing files locally on the server. Don’t give it an interactive shell, and don’t make the backup directory writable by everyone.

Create rsync daemon module

Edit configuration file:

1
sudo nano /etc/rsyncd.conf

Write the following; the network segment, username, and path should be replaced according to your environment:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
uid = rsyncbackup
gid = rsyncbackup
use chroot = no
max connections = 4
timeout = 600
log file = /var/log/rsyncd.log
pid file = /run/rsyncd.pid

[hyperbackup]
    path = /srv/hyperbackup
    comment = Synology Hyper Backup
    read only = no
    list = yes
    auth users = knightli
    secrets file = /etc/rsyncd.secrets
    hosts allow = 192.168.8.0/24
    hosts deny = *

[hyperbackup] is an rsync module. It maps the hyperbackup seen by the client to the actual directory /srv/hyperbackup on the server.

Configuration item Function
[hyperbackup] The name of the “Shared Folder” to be selected in Hyper Backup
path The location on Ubuntu where the backup data is actually saved
read only = no Allow Hyper Backup to write
auth users rsync protocol authentication user name, not Ubuntu login user
hosts allow Network segment allowed to access the service; can be further narrowed to a single IP of Synology

If Synology is fixed to 192.168.8.100, you can change hosts allow Change this address to reduce the chance of other devices on the LAN detecting the service.

Set the rsync protocol password

The authentication account of the rsync daemon and the Linux login account can be completely unrelated. Create a password file:

1
sudo nano /etc/rsyncd.secrets

Press 用户名:密码 to write one account per line, for example:

1
knightli:Abcd123456789

Restrict read permissions after saving:

1
2
sudo chmod 600 /etc/rsyncd.secrets
sudo chown root:root /etc/rsyncd.secrets

Do not submit this file to Git, and do not reuse your Ubuntu login password. The “User Account” and “Password” in the Hyper Backup page should be filled in with the values ​​defined here.

Start and confirm the rsync daemon

The systemd units provided by different Ubuntu versions or installation methods may be slightly different. First try to start the service provided by the software package:

1
2
3
sudo systemctl enable --now rsync
sudo systemctl restart rsync
sudo systemctl status rsync

Confirm port monitoring:

1
sudo ss -lntp | grep ':873'

Normally you will see similar results:

1
LISTEN 0 5 0.0.0.0:873

If rsync.service not found is prompted, first check the units actually available in the system:

1
systemctl list-unit-files | grep -i rsync

You can also use the following command to temporarily verify whether the configuration can be started:

1
sudo rsync --daemon --config=/etc/rsyncd.conf

The temporary startup will not automatically resume after restarting; after confirming that the manual method is available, the startup configuration of the corresponding service or socket should be completed based on the results of list-unit-files instead of relying on manual execution for a long time.

The firewall only allows Synology

If Ubuntu has UFW enabled, assuming the Synology IP is 192.168.8.100, only allow it access to TCP 873:

1
2
sudo ufw allow from 192.168.8.100 to any port 873 proto tcp
sudo ufw status numbered

Also check the cloud server security group, upstream router, or VLAN ACL. When ss shows listening and Synology still can’t connect, the problem is usually with one of these network policies.

First verify the module and write

on the command line. Do not repeat trial and error in Hyper Backup first. First list the modules from another Linux computer or Synology SSH terminal:

1
rsync rsync://[email protected]/

After entering the password set in /etc/rsyncd.secrets, you should see:

1
hyperbackup    Synology Hyper Backup

Try small file writing again:

1
2
3
4
echo test > /tmp/rsync-test.txt

rsync -av /tmp/rsync-test.txt \
  rsync://[email protected]/hyperbackup/

Confirm on Ubuntu:

1
ls -l /srv/hyperbackup/

If you can see rsync-test.txt, it means that the account number, password, module, directory permissions and network path have been opened. This file can be deleted after the test is completed.

How to fill in the Hyper Backup page

Return to the rsync target page of Synology Hyper Backup and fill in the following.

Page fields Example values Description
Server type rsync compatible server The target is a regular Ubuntu server, not another Synology system
Server IP 192.168.8.205 Ubuntu LAN address
Transmission encryption You can turn it off in the LAN first Turn it off and then use normal rsync/TCP 873; do not use it across public networks
Port 873 rsync daemon default port
User account knightli Corresponds to auth users
Password Password in rsync password file Not Ubuntu login password
Shared folder hyperbackup Corresponds to [hyperbackup], not an absolute path
Directory synology-nas Newly created subdirectory under the module directory

If the directory is filled with synology-nas, the final data will be written:

1
/srv/hyperbackup/synology-nas/

Do not fill in the “shared folder” with /srv/hyperbackup. The client can only see the module name through the rsync protocol, and the actual path is determined by the server-side configuration.

Frequently Asked Questions Troubleshooting

Hyper Backup cannot see the shared folder

Run the module enumeration command first. If there is no hyperbackup:

  1. Check whether /etc/rsyncd.conf really has [hyperbackup];
  2. Check whether the service has been restarted;
  3. Check list = yes and hosts allow Whether to block Synology;
  4. Check /var/log/rsyncd.log for certification or path error.

Can connect but prompts authentication failure

Confirm that the user name on the left side of auth users is exactly the same as /etc/rsyncd.secrets; the password file should be 用户名:密码 and the permission is 600. Pay special attention to the rsync password required for Hyper Backup, not the SSH or Ubuntu login password.

Authentication successful but unable to write

Check read only = no in the module, and then check the local directory permissions:

1
2
sudo namei -l /srv/hyperbackup
sudo ls -ld /srv/hyperbackup

rsyncbackup Must have traverse and write permissions on the path. If the log shows that the disk is full, read-only mount, or file system error occurs, the storage problem should be dealt with first to avoid repeated backup task failures.

Whether transport encryption should be turned on

Authentication with the normal rsync daemon is not equivalent to complete transport encryption. The trusted LAN can be temporarily closed based on risk assessment; when passing through the Internet, public Wi-Fi or untrusted network segments, use VPN, Tailscale, or switch to SSH encrypted transmission supported by Hyper Backup. Regardless of the transport method used, the backup job itself should still enable version retention and regular recovery drills.

Summary

The key to backing up Synology Hyper Backup to Ubuntu is not to install rsync, but to let Ubuntu provide a certifiable, writable, network-restricted rsync module. Just remember this mapping: [hyperbackup] is the shared folder in Hyper Backup, and path = /srv/hyperbackup is the real directory on Ubuntu. First use the command line module and write a test file, and then configure Hyper Backup. It will be much faster to locate the problem.

记录并分享
Built with Hugo
Theme Stack designed by Jimmy