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
- Access the server's command line as the
rootuser via SSH or Terminal in WHM. Use the
tar tfzcommand with thegrepcommand 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/Create a directory in which to place the data.
# mkdir /temp_location
Change to the new directory.
# cd /temp_location/
Use the
tar xfvzcommand 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 tfzcommand.Use the
lscommand to verify that the desired content was extracted.# ls -lah cptest/homedir/public_html/
Comments
0 comments
Article is closed for comments.