How do I manually locate and extract data from a cPanel backup? Print

  • 0

Question

How do I manually locate and extract data from a cPanel backup?

 

Answer

Note: You'll need to replace our example values with your backup file location, content to extract, and temporary directory.

  • Backup file location: /backup/2026-04-16/accounts/cptest.tar.gz
  • Directory to extract: public_html
  • Temporary directory: /temp_location
  1. Access the server's command line as the root user via SSH or Terminal in WHM.
  2. Use the tar tfz command with the grep command to locate the path to the file or folder to extract.

    tar tfz /backup/2026-04-16/accounts/cptest.tar.gz | grep public_html | grep -v .cpanel | head -1
    cptest/homedir/public_html/

  3. Create a directory in which to place the data.

    mkdir /temp_location

  4. Change to the new directory.

    cd /temp_location/

  5. Use the tar xfvz command to extract the directory from the backup file.

    tar xfvz /backup/2026-04-16/accounts/cptest.tar.gz cptest/homedir/public_html

    Note: "cptest/homedir/public_html" must be replaced with the path located with the tar tfz command.

  6. Use the ls command to verify that the desired content was extracted.

    ls -lah cptest/homedir/public_html/


Was this answer helpful?
Back

Send Message