How to Extract Only MySQL Databases from a full cPanel backup

Recently we accidentally dropped a table from a MySQL database on our development server. The thought of extracting a 34 GB gzip file to get to the MySQL backup was a painful one.

Here is a simple way to export only the MySQL folder from a full cPanel backup. The MySQL folder contains a bunch of .sql files. Each .sql file is a dump of a single MySQL database from the account.

Run this command from the shell:

tar -xvf username.tar.gz mysql


One thought on “How to Extract Only MySQL Databases from a full cPanel backup

Leave a Reply

Your email address will not be published. Required fields are marked *

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box

Your email address will not be published.