restore tar.gz file to different location
I created a tar file in the following location:
file name scriptsbkp.tar.gz
command used to create tar file:
tar -czvPf /home/denis/backups/scriptsbkp.tar.gz /home/denis/scripts
I want to extract tar.gz into following folder:
but I receive following error:
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: /home/denis/restored: Not found in archive
tar: Exiting with failure status due to previous errors
I used this command to restore:
tar -zxvf scriptsbkp.tar.gz /home/denis/restored
I can restore tar file in the /home/denis/scripts.
Can someone advise how do I restore tar.gz file to different location please? I was logged on as root while creating and restoring file.
Thanks in advance