Hallo, I'm new to this forum but I've been using Unraid since version 6.9.2 and I really like the Unraid system and I encountered the same problem as you describe here in this thread.
I would like to share my research with you!
First, I would like to mention that I run two Unraid servers, with Unraid OS Version 6.11.5. The servers have a Wireguard connection to each other, my Main Server is connected with LTE to the Internet and my Backup is connected to DSL/G. Fast, don´t ask why, it´s like that! Also, the distance between the two servers is round ~300km.
but now to my results
weirdcrap wrote the following:
weirdcrap has right when he writes that the problem is not Wireguard or the ISP, but if Wireguard is not causing the problem, what is causing the problem? when we look at the structure how we want it to transfer the data, is Wireguard as a first layer for protection, we want it that Wireguard encrypt our data, Wireguard does this!!!
in the tunnel then, works a combination of both programs and protocols Rsync and SSH. Normally the combination of Rsync and SSH is not the problem, especially in local use, since Rsync has no encryption. but SSH is not the most efficient protocol and here I come to the cause of our problem, because SSH or sftp (Secure File Transfer Protocol) is not the best option for transferring data, especially large data! Yes, SSH have a encryption but not efficient enough for transfer Large Data, this can be used as an additional security option, with the disadvantage of poor transmission.
My solution was that I identified SSH as a possible cause of the problem! but wait a minute if you don't use SSH, SMB, FTP how does you transfer data! this is a legitimate question and the answer to it is "rsync as daemon"! All protocols like SSH, SMB, FTP produce a large overhead that is added to the packets, which means that Wireguard or our eth0 or similar has to split the packets, that's not good because it affects the performance negatively!
so, I have running “rsync as daemon” on my backup server. The setup is super easy and you can secure the daemon with appropriate arguments.
I used the following guide:
1. How to Set Up an Rsync Daemon on Your Linux Server
2. How to Use Rsync to Copy/Sync Files Between Servers
3. Rsync Manuel Page
The instructions are for Ubuntu, but it also works with Unraid without any problems!👍
-------------------------------------------------------------------------------
my configs on backup site:
-------------------------------------------------------------------------------
User script: Rsync-Daemon-Autostart
#!/bin/bash
cp /boot/rsync-config/rsyncd.conf /etc/
cp /boot/rsync-config/rsyncd.secrets /etc/
sleep 1s
chmod 600 /etc/rsyncd.conf
chmod 600 /etc/rsyncd.secrets
sleep 1s
rsync –daemon
-------------------------------------------------------------------------------
rsyncd.conf
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsync.log
port = *****
[TEST]
path = /path/to/your/data
comment = blabla
read only = false
write only = false
auth users = rsync
hosts allow = x.x.x.x, x.x.x.x
hosts deny = *
secrets file = /etc/rsyncd.secrets
timeout = 300
…
-------------------------------------------------------------------------------
rsyncd.secrets
rsync1:passwd1
rsync2:passwd2
rsync3:passwd3
-------------------------------------------------------------------------------
You can use the instructions in the Guides and the Manuel page from rsync for more information.
-------------------------------------------------------------------------------
my script at Main site:
#!/bin/bash
BACKUP_SERVER=[IP other SERVER]
PORT=[PORT of the Daemon]
USER=[USER]
U_PASS=/boot/rsync_pass
SHARE1=/Path/to/your/Data
# preparations
# the cache is transferred to the disks
mover
# Reset the wg connection
wg-quick down [your WG-interface-Name] && wg-quick up [your WG-interface-Name]
# wait until everything is done
sleep 60s
target=$1
count=$( ping -c 5 $BACKUP_SERVER| grep icmp* | wc -l )
if [ $count -eq 5 ]
then
echo "1" $(date "+%d.%m.%Y - %T") "on"
echo "BACKUP SHARE1"
rsync -rtauvPh --stats --password-file=$U_PASS $SHARE1/* rsync://$USER@$BACKUP_SERVER:$PORT/SHARE1/
echo "Pause 15s"
sleep 15s
… #for more, the command can be used multiple times
else
echo "0" $(date "+%d.%m.%Y - %T") "OFF"
fi
-------------------------------------------------------------------------------
I think that was it, today I have Transfer Data for 8 hours with full Bandwidth without slow down!
I've been working on this solution for 3 months, I hope you can reproduce my results!
Sorry for my bad English!
Regards from Germany
Steven