UFS Extracting tar created on ext4 to ufs

I do this often with text files and audio/video files, and do not encounter many problems since the files are usually owned by my primary non-root user account. Files which are owned by, for instance, my primary Debian account (uid=1000) will get the ownership of my primary FreeBSD account (uid=1001) although I'm not sure exactly how or why this works. I usually use tar -czpf to create a .tgz file, and extract it on the other system with tar -xzpf. I don't use this method for files owned by, for example, root or postgres, not only because of non-native system concerns, but also out of concerns that the user and group ownerships probably wouldn't be right, because the uid's and group id's probably wouldn't match, but I would expect any text files' or audio/video files' contents to be correctly transfered. The -p option is to preserve file permissions, user and group ownerships, and timestamps. If you try to put the tar file on an msdosfs file system it can't be bigger than 4 GB, due, if I'm not mistaken, to the limitations of the msdosfs or FAT32 file system requirements.
 
I've extracted a gazillion tarballs over the years. I'm fairly certain most of them have been created on Linux. Also note that a lot of ports download tarballs created on Linux (ext2,ext4,xfs,whatnot) and extracts them without issue.

Why do you think you might run into problems?
 
Why do you think you might run into problems?

I'm just being cautious in asking for other users experiences. I don't know if there might be something embedded with ext3/4 which could be saved in the tar archive and might not be extractable to ufs...
 
I don't know if there might be something embedded with ext3/4 which could be saved in the tar archive
You're looking at it from the wrong angle. It's not the filesystem that saves things in a tarball. It's the tar(1) application that collects the data and it simply doesn't collect any filesytem specific data.
 
I'm just being cautious in asking for other users experiences. I don't know if there might be something embedded with ext3/4 which could be saved in the tar archive and might not be extractable to ufs...

The only things that might cause problems can be fixed with --no-xattrs or --no-acls arguments which will turn off the extended attributes. Most of the extended attributes will work on ufs or zfs file systems unless your tar file happens to have some experimental feature in which case it should be ignored. Modern tar files are in a POSIX format called pax and can be processed with the pax(1) command. Most Linux systems use gun tar gtar(1) and bsdtar(1) was an rewrite of that. There are a number of other tar programs around and some of them will make funny tar files in some edge cases but they can be tested before extracting them with tar(1), gtar(1), pax(1) or sometimes cpio(1) and rarely ar(1) for ancient suff.
 
Back
Top