Trying to extract homedir.tar

fkatzenb

Well-Known Member
Sep 23, 2009
216
0
66
Lusby, Maryland, United States
cPanel Access Level
Root Administrator
I am trying to find some files that were deleted on one of the accounts from a few weeks ago. I took the backup, acctname.tar.gz, and extracted it. I went to extract the homedir.tar and it won't let me!

Code:
[email protected] [/backup/w02/acctname]# tar xvzf homedir.tar

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I am trying to find some files that were deleted on one of the accounts from a few weeks ago. I took the backup, acctname.tar.gz, and extracted it. I went to extract the homedir.tar and it won't let me!

Code:
[email protected] [/backup/w02/acctname]# tar xvzf homedir.tar

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
For non-gzip-compressed tar archives please try the following example command (that notably omits the "-z" switch used for gzip-compression):
Code:
# tar -xvf homedir.tar
For additional reference I recommend reviewing the manual "man" documentation using the following command:
Code:
# man tar
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
I have extracted using the command
# tar -xvf homedir.tar

but the directory homedir is not created


[email protected][/backup/cpbackup/monthly/nilesh/]# cd homedir
-bash: cd: homedir: No such file or directory
 

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
I have extracted using the command
# tar -xvf homedir.tar

but the directory homedir is not created


[email protected][/backup/cpbackup/monthly/nilesh/]# cd homedir
-bash: cd: homedir: No such file or directory
It should have been created. Did you end up with the original homedir.tar file or is it lost as well.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I have extracted using the command
# tar -xvf homedir.tar

but the directory homedir is not created

[email protected][/backup/cpbackup/monthly/nilesh/]# cd homedir
-bash: cd: homedir: No such file or directory
The command used may have extracted the contents into the same directory from where the command was executed, for example, the directory name matching the cPanel account username.

What does a directory listing show within the same path?
Code:
# ls -ahl /backup/cpbackup/monthly/nilesh
If the directory "homedir" does not exist, try the following to ensure it is created before proceeding:
Code:
# mkdir -pv homedir
To verify the directory "homedir" exists, use stat:
Code:
# stat homedir
Once you've verified homedir exists, you may then extract the archive contents into the specified directory, as seen below:
Code:
# tar -xvf homedir.tar -C homedir
If there's still difficulty, try using one of the following to just list the contents (without extracting); this should help identify or confirm what is stored and at what directory paths within the archive:
Code:
# tar -tvf homedir.tar