Backup data while keeping POSIX ACLs and permissions

apt-get install star
man star
star -acl -whatever -other -options -you -need

Star is tar with support for extended POSIX headers, that is, the ability to store some extra data about a file in the tar file. The -acl option gets the ACLs; you need it for both archive creation and extraction.


If you don't want to install another program, you can backup the ACLs separately:

getfacl -R somedir > acls.txt

This dumps all the ACLs from somedir into the file acls.txt.

To restore, use:

setfacl -R --set-file=acls.txt somedir

beside star you can use bsdtar