Rsync destination to TrueNAS

sozotech

Well-Known Member
Jul 26, 2013
108
5
68
cPanel Access Level
Root Administrator
I was attempting to set up an rsync destination on a TrueNAS server via SSH but I can never get the validation to complete successfully. I keep getting an error "could not upload test file: child exited with code 1".

I changed the destination to a different Linux server and it worked right away. Anyone else successfully used TrueNAS for an Rsync via SSH destination?

Best regards,
Eric
 

RickNg

Registered
Oct 28, 2021
1
1
3
Malaysia
cPanel Access Level
DataCenter Provider
TrueNAS shipped rsync that is compiled with only system zlib (external zlib) and without bundled zlib (‑‑with-included-zlib=no). Whereas most distro still shipped with rsync's custom zlib due to the interoperability reasons.

Code:
[[email protected] ~]# rsync --compress TESTFILE [email protected]:./
rsync: This rsync lacks old-style --compress due to its external zlib.  Try -zz.
rsync error: syntax or usage error (code 1) at main.c(1592) [server=3.1.3]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
Source: CentOS Linux release 7.9.2009 with rsync 3.1.2-10.el7
Destination: TrueNAS-12.0-U5.1 with rsync 3.1.3_2

When sending from CentOS rsync "--with-included-zlib=yes" to TrueNAS rsync "--with-included-zlib=no" using old style compression --compress, --old-compress, -z, the transfer will fail but in reverse, TrueNAS rsync will fallback to non compression transfer to CentOS
To use compression in rsync 3.1.x, --new-compress , -zz should be used when transfering to rsync without bundled zlib.
When both ends are at least rsync 3.2.0, a negotiation phase is added to pick suitable compression but AlmaLinux 8 still ship with 3.1.3

possible solution, compile/repalce truenas's rsync with included zlib or cpanel update backup rsync to not use compression or use use -zz
 
  • Like
Reactions: 4est