I need my backups exactly same data, including the file attributes. Apparently "btrfs receive" ignores the CoW attribute. Here is the reproduction:
btrfs sub create ./a mkdir a/b chattr +C a/b echo "hello" > a/b/file btrfs sub snap -r ./a ./a.ro mkdir x btrfs send a.ro | btrfs receive x lsattr a.ro lsattr x/a.ro Result is: # lsattr a.ro ---------------C--- a.ro/b # lsattr x/a.ro ------------------- x/a.ro/b Expected: x/a.ro/b folder should have CoW disabled (same as a.ro/b folder) How can I workaround this issue in order to have correct attributes in my backups?