Acer NAS 700 Computer Drive User Manual


 
Back up/restore extended attributes on Linux
When you perform a file-by-file backup or restore of your NAS shares you will
also want to back up/restore the extended attributes (ACL attributes and quota
information). There are no special steps needed for a raw device (image/block
level) backup/restore.
1. For backup:
Use
“getfacl -R” and “getfattr -R-d” to back up the
ACLs/attributes.
These commands can be used to back up/export extended attributes of
filesystem objects and should be run in a simple batch file or by using the pre-
process command, if your backup application supports this. The files generated
by these commands should be backed up by your backup software because
they will be used during the restore process to restore ACLs and attributes.
The usage is as follows:
getfacl -R
source
>
file1
getfattr -R-d
source
>
file2
Where
source
is the name of the file or directory that will be backed up.
file1
is the name of the output file that will be used for restoring the ACLs
and
file2
is the name of the output file that will be used for restoring the extended
attributes.
The "-R" option is used to list the extended attributes of all files and folders
recursively.
Use your backup software to make a backup of your XFS filesystem including
file1
and
file2
.
For restore:
2. Use your restore software to restore your filesystem, directory, or
file(s).
Be sure to restore the files created using the
getfacl
and
getfattr
commands (
file1
and
file2
in our example). These files will be used to
apply the ACLs and attributes of the filesystem, directory, or file being
restored.
3.
Use “setfacl --restore” or “setfattr --restore” to apply the
restored attributes.
setfacl --restore=
file1
setfattr --restore=
file2
where
file1/file2
are the names of the output files created when using the
getfacl
or
getfattr
command.
For further information on the usage of these utilities, refer to the man pages.
Acer Altos® NAS 700 Solution Guide
156