1

I would like to copy/sync files from a Linux box to a FreeBSD server. As the files tend to have extended attributes, I want to preserve these on the target file system.

The source filesystems are either Ext4 or BTFRS, the target filesystem is ZFS with extended attributes enabled.

What works is: first tar'ing files on the Linux box and then untar'ing it on the BSD box

linux > tar -cvf --xattrs tmp.tar test.file
...copy... 
bsd > tar -xv tmp.tar

As it is clunky, I am looking for a more straight forward way.

What not works are: transfers/copies over

  • NFS3/4 - as it does not know about extended attributes, and
  • rsync via ssh or with a rsyncd

1 Answer 1

2

Tar is probably your best bet, as you aren't running ZFS on the Linux box. Otherwise you could probably just zfs send/recv.

But you can skip the temporary tarball and simply send the data in one shot:

tar --xattrs -cvf - test.file | ssh [email protected] "tar -xvf -"
1
  • thanks - yes, pipeing the tar-ball might really be the most usable path. zfs send/recieve would of course be the easiest, but unfortunately as it is the BSD box is a NAS for a number of Linux clients. I had also a look, if a fuse FS might be an option, but the closest might be something like 'archivemount' to mount tar-balls in userspace - but it is 'static' and I am not sure about any xattr support.
    – THX
    Sep 24, 2019 at 13:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .