see explanation below. Explanation cd /usr/local tar -jcvf /root/backup.tar.bz2 mkdir /test tar -jxvf /root/backup.tar.bz2 -C /test// Decompression to check the content is the same as the /usr/loca after If the questions require to use gzip to compress. change -j to -z.