I have set up a small 1TB NAS appliance, now running on OpenWRT, to back-up files from a small 500Gb drive inside my Devuan Linux box holding all my Timeshift
and BackInTime
snapshots.
The NAS's specs -800MHz APM82181/256MB RAM- require avoiding the use of ssh
or wait ages for a job to complete at 7.50MiB/s max, in spite of both ends having GbE ports negotiating at 1000M.
Happens that ssh
beats this hardware to death with an almost constant 100% CPU load, mostly due to encryption, so it is not an viable option.
All this is done within a local network with no access from the ouside and I am the only user, so the lack of encryption is not an issue.
With that in mind, I had no choice but to use rsync
as a daemon at the NAS end which would get me at least 3.5/4.0 times the throughput I can get with ssh
.
The problem is that I am getting an error I cannot find a solution to.
:~$ rsync -av --progress /media/stuff/firefox.oldfile rsync://groucho@192.168.1.3:/stuff
sending incremental file list
firefox.oldfile
85,812,416 100% 28.23MB/s 0:00:02 (xfr#1, to-chk=0/1)
rsync: [receiver] mkstemp "/.firefox.oldfile.hiOlHH" (in stuff) failed: Permission denied (13)
sent 85,833,480 bytes received 142 bytes 24,523,892.00 bytes/sec
total size is 85,812,416 speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
:~$
The good news is that 28.23MB/s is (apparently) obtainable. =^)
I have read that this is a permission issue originating in rsync
not being able to write the temporary file /.firefox.oldfile.dMAADG
to the destination folder
/mnt/sda3/stuff
.
The log file adds nothing to the terminal printout:
root@OpenWrt:~# cat /var/log/rsyncd.log
[2726] connect from UNDETERMINED (192.168.1.2)
[2726] rsync allowed access on module stuff from UNDETERMINED (192.168.1.2)
[2726] rsync to stuff/ from UNDETERMINED (192.168.1.2)
[2726] receiving file list
[2726] rsync: [receiver] mkstemp "/.firefox.oldfile.dMAADG" (in stuff) failed: Permission denied (13)
root@OpenWrt:~#
I think my rsyncd.conf
file is correct:
:/etc$ cat /etc/rsyncd.conf
# /etc/rsyncd.conf
# minimal configuration for rsync daemon
# -----------------------
# begin global parameters
uid = %RSYNC_USER_NAME%
gid = *
use chroot = true
max connections = 1
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
read only = false
reverse lookup = no
exclude = lost+found
timeout = 180
hosts allow = 192.168.1.2 # use after everything is working properly
# port = # set other than default 873
# socket options =
# ignore nonreadable =
# dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
# end global parameters
# ---------------------------
# begin module parameters
# shared folder for testing
[testdir]
path = /mnt/sda3
read only = false
# comment =
# shared folder for stuff
[stuff]
path = /mnt/sda3
read only = false
# comment =
# shared folder for bkups
[bkups]
path = /mnt/sda3
read only = false
# comment =
The ownership of the destination directories is correct as far as I can make out:
:~$ ls -l /mnt/sda3
drwxrwxrwx 4 groucho groucho 4096 Apr 25 19:03 bkups
drwxrwxrwx 2 groucho groucho 4096 Apr 29 18:47 stuff
drwxrwxrwx 2 groucho groucho 4096 Apr 28 17:53 testdir
:~$ ls -l /mnt
I've been at this for a couple of days now, to no avail.
I'd appreciate it if someone could shed some light on this for me.
Thanks in advance,
G.