From da6e9fdcc2fcacc234ba9b472124d4d2a89d855a Mon Sep 17 00:00:00 2001 From: Stephane Thiell Date: Thu, 6 Jul 2023 15:55:05 -0700 Subject: [PATCH] LUDOC-514: add --acls and -P for MDT backup/restore Tar will only restore the following xattr if --acls is provided: system.posix_acl_access system.posix_acl_default Update the documentation to mention --acls for MDT backup/restore. Lastly, using -P / --absolute-names speeds up tremendously the extraction for trusted archive with hardlinks (like MDT backup archives). Signed-off-by: Stephane Thiell Change-Id: I9db6729c029580edaf77129fc752befb6f0dc9fb Reviewed-on: https://review.whamcloud.com/c/doc/manual/+/51599 Tested-by: jenkins Reviewed-by: Andreas Dilger --- BackupAndRestore.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/BackupAndRestore.xml b/BackupAndRestore.xml index 8e8fcf8..ffcf973 100644 --- a/BackupAndRestore.xml +++ b/BackupAndRestore.xml @@ -605,7 +605,7 @@ trusted.fid= \ Back up all file system data. - [oss]# tar czvf {backup file}.tgz [--xattrs] [--xattrs-include="trusted.*" --sparse . + [oss]# tar czvf {backup file}.tgz [--xattrs] [--xattrs-include="trusted.*"] [--acls] --sparse . The tar --sparse option is vital for backing up an MDT. @@ -621,6 +621,9 @@ trusted.fid= \ --xattrs-include="trusted.*" option is required for correct restoration of the xattrs when using GNU tar 1.27 or RHEL 7 and newer. + The tar --acls option is recommended for + MDT backup of POSIX ACLs. Or, getfacl -n -R + and setfacl --restore can be used instead. @@ -696,7 +699,7 @@ trusted.fid= \ Restore the file system backup. - [oss]# tar xzvpf {backup file} [--xattrs] [--xattrs-include="trusted.*"] --sparse + [oss]# tar xzvpf {backup file} [--xattrs] [--xattrs-include="trusted.*"] [--acls] [-P] --sparse The tar --xattrs option is only available in GNU tar version 1.27 or later or in RHEL 6.3 or newer. The @@ -705,6 +708,14 @@ trusted.fid= \ MDT xattrs when using GNU tar 1.27 or RHEL 7 and newer. Otherwise, the setfattr step below should be used. + The tar --acls option is needed for + correct restoration of POSIX ACLs on MDTs. Alternatively, + getfacl -n -R and + setfacl --restore can be used instead. + The tar -P (or + --absolute-names) option can be used to speed + up extraction of a trusted MDT backup archive. + -- 1.8.3.1