The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel's backup compression method

Discussion in 'Data Protection' started by Nathan D., Jun 18, 2012.

  1. Nathan D.

    Nathan D. Well-Known Member

    Joined:
    Mar 21, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Virginia
    I noticed that when cPanel does a full backup using tar compression, I'm able to open/view the archive without extracting it (in Windows). However, when I compress a directory myself using tar -cvf, it forces me to extract the contents before viewing it.

    What command(s) is cPanel using to create/compress the directories into a tar?

    I apologize if this is basic Linux/cPanel knowledge.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This will sound pedantic but tar -cvf does not compress, it only archives. To compress you need to add the appropriate parameters to the tar command. Our backup software uses gzip for compression. The command line for tar would look like tar -czvf.
     
  3. Nathan D.

    Nathan D. Well-Known Member

    Joined:
    Mar 21, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Virginia
    I accidentally left off the -z (for gzip) in my original post and actually have tried with that option, but still have the problem. After running that command and downloading the .tar file, when I open it in Windows with something like 7zip, I see a file within it simply named the same as the .tar file but without the .tar extension. Why don't I see the folder/file structure as I do with a cPanel-generated backup?
     
Loading...

Share This Page