rsync can't backup linux box, fresh copy from ports works

Description

Discussion here: https://www.ixsystems.com/community/threads/rsync-tasks-to-backup-linux-boxes.85340/

Trying to use rsync to backup a linux box (a simple Raspbian box). Flags are

--fake-super --progress -aAXSvzhe ssh --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"}

The supplied rsync fails with:

receiving incremental file list
Invalid xattr name received (missing trailing \0).
rsync error: error in file IO (code 11) at xattrs.c(829) [Receiver=3.1.3]

Building a fresh copy of rsync from ports (in a fresh jail) gets a working rsync. It looks at a minimum like there's something different about the build process that's not expected:

freenas% rsync --version
rsync version 3.1.3 protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 32-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, no prealloc

rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
freenas% /mnt/tank/iocage/jails/rsync_test/root/usr/local/bin/rsync --version
rsync version 3.1.3 protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 32-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, no prealloc, file-flags

rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.

This would seem to indicate that the FLAGS_EXTRA_PATCHES part of the port isn't being processed correctly in the default build.

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Andrew Walker 
November 3, 2020 at 7:22 PM

Changing this parameter will break NFSv4 ACL support in rsync, which is unacceptable. At some future time, we could probably expose FreeBSD's native NFSv4 ACLs as NDR-encoded system.nfs4acl xattrs and synchronize them through rsync's xattr support. That's probably somewhat far in the future and risks regression. Rsync is one of those tools that must not regress.

Andrew Walker 
October 15, 2020 at 2:08 PM
(edited)

If we remove the patch for nfs4 ACLs, then FreeBSD to FreeBSD rsync will no longer be able to synchronize the native NFSv4 ACLs. What if you specify "--no-perm"?

Alex Rosenberg 
June 10, 2020 at 8:40 PM

More isolation: the port's files/extrapatch_acls changes change the bits on the wire, breaking compatibility with other builds of rsync. xattrs come after and are reading garbage on the wire.

Alex Rosenberg 
June 10, 2020 at 6:32 PM

Confirmed that building without FLAGS enabled triggers the failure.

Alex Rosenberg 
June 10, 2020 at 1:45 AM

Here's the device being backed up (via SSH):

alexr@ha:~ $ rsync --version rsync  version 3.1.3  protocol version 31 Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/ Capabilities:     64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,     socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,     append, ACLs, xattrs, iconv, symtimes, prealloc rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are welcome to redistribute it under certain conditions.  See the GNU General Public Licence for details.
Not to be Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

More fields

Katalon Platform

Created June 8, 2020 at 7:21 PM
Updated July 1, 2022 at 4:52 PM
Resolved November 3, 2020 at 7:22 PM