Shortcut for extracting homedir.tar subdirectories

sebby

Well-Known Member
Jun 15, 2004
70
0
156
Canada
cPanel Access Level
Root Administrator
Hi everyone,

Every other day I check the integrity of my account backups at random and uncompress the homedir and mysql directories on a local server at the office to rebuild the sites locally ("tar -xzvf username.tar.gz username/homedir/public_html username/mysql" use to give me the files I needed to do this).

Starting with WHM 11.24, the homedir is now archived (homedir.tar) and nested in the main tarball. Can anyone suggest a neat command line to extract at once the mysql and public_html directories in this new setup (without the need to uncompress all the rest)?

I thank you in advance for your suggestions.

Sebby

Running CentOS 5.2
 

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
Hi everyone,

Every other day I check the integrity of my account backups at random and uncompress the homedir and mysql directories on a local server at the office to rebuild the sites locally ("tar -xzvf username.tar.gz username/homedir/public_html username/mysql" use to give me the files I needed to do this).

Starting with WHM 11.24, the homedir is now archived (homedir.tar) and nested in the main tarball. Can anyone suggest a neat command line to extract at once the mysql and public_html directories in this new setup (without the need to uncompress all the rest)?

I thank you in advance for your suggestions.

Sebby

Running CentOS 5.2
You may try the following command to extract a specific file from your tar.gz file.

tar -z --extract --file=yourbackup.tar.gz yourbackup/path/to/folder

Assuming, you must know the hierarchy and paths of things in the backup before it was compressed.
 

sebby

Well-Known Member
Jun 15, 2004
70
0
156
Canada
cPanel Access Level
Root Administrator
You may try the following command to extract a specific file from your tar.gz file.

tar -z --extract --file=yourbackup.tar.gz yourbackup/path/to/folder
Thanks Howard but this is a no go as I want to extract in a single step the public_html directory included in the homedir.tar archive that is nested in the main tarball (username.tar.gz). I am looking for a way to pipe those 2 operations somehow...

Cheers,

Sebby
 

jpgauvin

Registered
Apr 7, 2008
1
0
51
I just find out that I have the same problem :mad:

please if someone know the answer, let me know :confused:

thanks
 
Thread starter Similar threads Forum Replies Date
B Backups 4
Z Backups 6
M Backups 2