Using the tar --acls option to prevent the loss of ACLs during a backup
The tar
utility is a very handy tool for creating compressed archive files of your important directories. The only catch is that when you use it on files that have attached ACLs, you’ll need to use the --acls
option to prevent the loss of your ACLs. In this directory, you see that ACLs have been assigned to the bottom two files:
[donnie@localhost ~]$ cd perm_demo_dir
[donnie@localhost perm_demo_dir]$ ls -l
total 0
-rw-rw-r--. 1 donnie accounting 0 Nov 5 20:17 file1.txt
-rw-rw-r--. 1 donnie accounting 0 Nov 5 20:17 file2.txt
-rw-rw-r--. 1 donnie accounting 0 Nov 5 20:17 file3.txt
-rw-rw-r--. 1 donnie accounting 0 Nov 5 20:17 file4.txt
-rw-rw----+ 1 donnie donnie 0 Nov 9 15:19 frank_file.txt
-rw-rw----+ 1 donnie donnie 0 Nov 12 12:29 new_file.txt
[donnie@localhost perm_demo_dir]$
Now, I’ll do the backup without --acls
:
[donnie@localhost perm_demo_dir]$ cd
[donnie@localhost...