How to use ‘tar’ command to backup all directories in the home folder into a single

backup
shell

#1

Use the ‘tar’ command to backup all directories in the home folder into a single
tar file. Restore these files/folder into a different location in Unix/Linux.


#2

The command is as follows to save backups to /backups/ directory

mkdir /backups/
tar -zcvf /backups/home.tar.gz /home/ 

See https://www.cyberciti.biz/faq/how-do-i-compress-a-whole-linux-or-unix-directory/