{"id":429,"date":"2013-10-10T11:26:23","date_gmt":"2013-10-10T16:26:23","guid":{"rendered":"http:\/\/bitc.bme.emory.edu\/~lzhou\/blogs\/?p=429"},"modified":"2013-10-10T11:26:23","modified_gmt":"2013-10-10T16:26:23","slug":"tar-and-rsync-archive-and-preserve-selinux-contexts-extended-attributes-and-acls","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=429","title":{"rendered":"tar and rsync: Archive and Preserve SELinux Contexts, Extended Attributes, And ACLs"},"content":{"rendered":"<p>tar &#8211;selinux &#8211;acls &#8211;xattrs  -cvfz file.tgz yourfiles<br \/>\nWhere,<br \/>\n    &#8211;selinux &#8211; Save the SELinux context to the archive called file.tgz.<br \/>\n    &#8211;acls &#8211; Save the ACLs to the archive called file.tgz.<br \/>\n    &#8211;xattrs &#8211; Save the user\/root xattrs to the archive called file.tgz Please that it archive all extended attributes, including SELinux and ACLs.<br \/>\n    -c &#8211; Create a new archive called file.tgz.<br \/>\n    -v &#8211; Verbose output.<br \/>\n    -f file.tgz &#8211; Archive file name.<br \/>\n    -z &#8211; gzip.<br \/>\n    yourfiles &#8211; Create archive called file.tgz from yourfiles<\/p>\n<p>rsync -av -A -X \/source\/path \/dest\/path<br \/>\nWhere,<br \/>\n    -A : Preserve ACL.<br \/>\n    -X : Preserve extended attributes\/SELinux.<br \/>\n    -a : Archive mode.<br \/>\n    -v : verbose.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>tar &#8211;selinux &#8211;acls &#8211;xattrs -cvfz file.tgz yourfiles Where, &#8211;selinux &#8211; Save the SELinux context to the archive called file.tgz. &#8211;acls &#8211; Save the ACLs to the archive called file.tgz. &#8211;xattrs &#8211; Save the user\/root xattrs to the archive called file.tgz Please that it archive all extended attributes, including SELinux and ACLs. -c &#8211; Create a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-429","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions"}],"predecessor-version":[{"id":430,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions\/430"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}