Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Finding the MySQL file in a cPanel backup

Discussion in 'Data Protection' started by woodland, Jan 15, 2018.

  1. woodland

    woodland Registered

    Joined:
    Jan 15, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Stockholm
    cPanel Access Level:
    Website Owner
    Hi, first post

    I am trying to restore a wordpress site from a "cpmove-xxxx" file. The cPanel from which this cpmove file was made hosted the Wordpress site. The new server which i am moving the site to does not have cPanel installed. I am trying to upload the contents of the mySql database to phpMyAdmin. Is there i file in cpmove-xxxx from which i can get the database from the wordpress site?
     
  2. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Hi @woodland,

    You may find the MySQL dumps in the '/mysql/' directory of the extracted backup. In the command below, we are just looking in the archive for files/directories that match "*mysql*sql", without actually extracting:
    Code:
    # tar -tf /home/cpmove-cptest.tar.gz *mysql*sql
    cpmove-cptest/mysql/cptest_testdb.sql
    cpmove-cptest/mysql-timestamps/mysql
    cpmove-cptest/mysql.sql
    
    In the below example, we extract the archive for files/directories that match "*mysql*sql", then change to the desired directory, and list its contents:
    Code:
    # tar -zxvf /home/cpmove-cptest.tar.gz *mysql*sql
    cpmove-cptest/mysql/cptest_testdb.sql
    cpmove-cptest/mysql-timestamps/mysql
    cpmove-cptest/mysql.sql
    
    # cd cpmove-cptest/mysql
    # ls
    cptest_testdb.sql
    
    Thanks,
     
  3. woodland

    woodland Registered

    Joined:
    Jan 15, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Stockholm
    cPanel Access Level:
    Website Owner
    My cpmove-xxxx/mysql does not contain the database however in homedir and subfolders i have several different .sql files. Could anyone of these be the database dump?
     
  4. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Those may actually be user-made MySQL dumps. I can't be sure if those are what you need, but '.sql' files are certainly database dumps. If the stamps are recent, and the filename matches your database, then those are likely useful.

    If the database was present under the cPanel user at the time of the backup, then the MySQL dumps should be found in the '/
    mysql/' directory.
     
Loading...

Share This Page