backupFilePath* is the path to the tar archive which contains the backup of your former home folder. This tar archive may have been created using the command line given in post #2, recalled bellow for convenience:
/$ tar --one-file-system -cWf *backupFilePath* "$HOME" --exclude="$HOME/.cache"
A typical use case would be Tux wanting to backup up his home folder before re-installing openSUSE. First, he creates a tar archive containing all his data in an external hard drive partition called myHardDrive. The partition myHardDrive has been mounted to /run/media/tux/myHardDrive.
/$ tar --one-file-system -cWf /run/media/tux/myHardDrive/backup.tar /home/tux --exclude=/home/tux/.cache
The resulting size of /run/media/tux/myHardDrive/backup.tar should be very close to the size of /home/tux.
GNU tar implementation removes by default the leading / of tar archive members’ path. So, if Tux had a file in his home folder which path was /home/tux/letter.txt, it would be stored in /run/media/tux/myHardDrive/backup.tar as home/tux/letter.txt. This is an important point to remember when restoring from a tar archive.
Tux as finished to re-install openSUSE and have created a temporary user backupagent in order to restore his data with an unprivileged user. Using YaST he creates a new user called tux. He plugs in his external hard drive and mounts the myHardDrive partition to /run/media/backupagent/myHardDrive. He wants his former tux home folder to be restored in /home/tux, where the new tux home folder lies. Remembering that the leading / has been removed inside the tar archive, he needs to extract the contents of the tar archive from the root of the filesystem /:
**/**# tar -xf /run/media/backupagent/myHardDrive/backup.tar
He runs the command as root so the permissions and ownership of his former home folder are also restored. Eventualy, he checks the ownership and permissions of /home/tux using ls:
$ ls -l /home/tux
He see that /home/tux is owned by tux user and is assigned to users group. If it was otherwise, he could have corrected the ownership using chown:
# chown -R tux:users /home/tux
I hope this use case made it clearer how tar can be used for backing up and restoring data. If you choose to take this use case as an example, please check the command lines before executing them. Chiefly those executed as root.