Does OpenWrt use ACLs and Extended file system attributes?

Hello,

I want to make an rsync backup of the OpenWrt boot and root file systems running on my Pi 4.

To do this I have this script to backup the root file system while omitting certain directories:

#!/bin/bash
rsync -aEiv \
	  --exclude='/dev/*' \
	  --exclude='/proc/*' \
	  --exclude='/sys/*' \
	  --exclude='/tmp/*' \
	  --exclude='/mnt/*' \
	  --exclude='/lost+found' \
	  --log-file=/mnt/usb/openwrt/BackupOfImages/rsynclog.log \
	  / /mnt/usb/openwrt/BackupOfImages/rsyncpartitions

I use the -E option because I thought it was a substitute for -AX however it doesn't seem to be. The -AX flags are not supported in the version of rsync in the opkg feeds.

I tested and when I set an extended file system attribute on a file before I run rsync..
setfattr -n user.example -v example backup-router
..it appears in the file OK...

root@OpenWrt:/etc/config# getfattr -d backup-router
# file: backup-router
user.DOSATTRIB=0sAAAEAAQAAABRAAAAIAAAAFoExZp54dYBWgTFmnnh1gE=
user.example="example"

But it is not preserved in the backup.

My Question:

  1. Does OpenWrt make use of ACLs or extended file system attributes that would need to be preserved in an rsync backup?
  2. Any plans to upgrade the version of rsync in the feeds to support the A and X flags?

Cheers,

Flex

1 Like

I just ran across this today. I guess I could get a toolchain installed in an OpenWRT VM to spin my own rsync package.

This would be very nice , I need it to make working lxc-snapshots.

#lxc-snapshot myfedora my-snapshot --logfile=/tmp/debugfile

lxc-snapshot: myfedora: lxccontainer.c: do_lxcapi_snapshot: 4177 Snapshot of directory-backed container requested
lxc-snapshot: myfedora: lxccontainer.c: do_lxcapi_snapshot: 4178 Making a copy-clone.  If you do want snapshots, then
lxc-snapshot: myfedora: lxccontainer.c: do_lxcapi_snapshot: 4179 please create overlay clone first, snapshot that
lxc-snapshot: myfedora: lxccontainer.c: do_lxcapi_snapshot: 4180 and keep the original container pristine
lxc-snapshot: myfedora: storage/storage.c: storage_copy: 516 Failed to rsync from "/usr/lib/lxc/rootfs" into "/srv/lxc/myfedora/snaps/snap0/rootfs": rsync: extended attributes are not supported on this client
lxc-snapshot: myfedora: lxccontainer.c: copy_storage: 3594 Error copying storage.
lxc-snapshot: myfedora: lxccontainer.c: do_lxcapi_snapshot: 4186 Failed to clone of /srv/lxc:myfedora
lxc-snapshot: myfedora: tools/lxc_snapshot.c: do_snapshot: 199 Error creating a snapshot