I need to backup my home folder (and a few other folders) on an organizational Linux NFS system where my account will be expiring soon, onto a personal hard drive (which is not using a Linux filesystem). I access the account through SSH and SFTP. I want to backup all metadata for these files and directories and everything in them, including dates, owners, groups, UID/GID numbers, CHMOD permissions, etc. How can I go about doing this? Do I need to run the LS command recursively on the directory with certain settings of what information to display, and pipe the results to a file so that the information will be in a file regardless of which filesystem I move it to? Or is there a way to save all the metadata using something like TAR/GZ? If it's with TAR/GZ, then how do I view this metadata on other filesystems that I move the archive to, and will the users/groups stored remain intact as long as it's not extracted?
In addition, do you know how to do this for SELinux metadata and AFS (Andrew File System) metadata too? (These will be for another filesystem later on, but if don't know the answer to either of these, please still answer the above.)