Thank you Roland for that suggestion: I honestly had forgotten about
that option.
It's great (and available) for single, or a handful of objects, but...
I'm doing this for hundreds-of-thousands of filesystem objects
(files+folders with many xattrs), so performance matters: therefore your
suggestion would "cost" a program call, plus a write/read of a new
xattr-dump file, which I expect to be significantly slower than let's
say: doing the same in code, loading the xattrs lib only once?
And since I'm altering only filesystem "metadata", and not the "heavy"
payload, that information is mostly lightweight (given that I'm using a
90GB SSD partition as ZFS cache. Opinions/experiences about this?)
And so it would make perfect sense to "sync xattrs" in rsync, as IMO it
considered /the/ filedata-synchronization tool of choice for
small-to-large scale, reliable replication. :)
I truly (and professionally, as well as personally) believe that xattr
key+value attributes in the filesystem have great value for 21st century
"data handling demands", and consumer "collections" already qualifying
as "big data" (as in 2003 terms): xattrs allow to use regular ZFS as
object storage - with more metadata capabilities than S3.
What do you think? :)
Regards,
Peter
On 27.04.2026 00:47, RolandK wrote:
do we really need rsync for this?
root@debian:/# setfattr -n user.attr1 -v value1 ./dir/testfile
root@debian:/# getfattr -R -d ./dir/testfile >attrs.dump
root@debian:/# cat attrs.dump
# file: dir/testfile
user.attr1="value1"
root@debian:/# xattr -c ./dir/testfile
root@debian:/# getfattr -R -d ./dir/testfile
root@debian:/#
root@debian:/# setfattr --restore attrs.dump
root@debian:/# getfattr -R -d ./dir/testfile
# file: dir/testfile
user.attr1="value1"
regards
Am 26.04.26 um 22:34 schrieb Peter B. via rsync:
Hi everyone :)
I'd need to re-apply extended filesystem key-value metadata
attributes (xattrs on ZFS) from one file/folder to another.
But it's mandatory that the target "payload" (=binary file contents)
stay untouched.
Just transfer (add/merge/overwrite) the xattrs?
Using xattrs professionally for medium-to-large scale heritage and
science collections, and using rsync for /everything/ regarding
data-transfer. Thank you all so much!
Would it be possible to hire one for adding that to rsync, merging
into upstream?
What are your thoughts on this?
Thanks in advance!
Peter
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html