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.

Backup and restore MySQL DBs

Discussion in 'General Discussion' started by bmcclure, May 12, 2004.

  1. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    I backed up my MySQL DBs from one of oru main accounts using the MySQL backup feature in CPanel. I saved them to my compute (they were .gz files). I then tried restoring them on a different machine using CPanel and it does not work. It creates the database but no tables are restored. All the data must be therebecause the file sizes of the .gz files vary greatly. Can anyone help?
     
  2. mark1

    mark1 Well-Known Member

    Joined:
    Jan 26, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,
    could be the size of the file?

    Extract the content on your desktop, and rename it filename.sql (just add the ".sql")
    then from cPanel goto phpMyAdmin, from there select your database, then select SQL, then browse and upload the file.

    If the file is too large, upload the file to your server and via SSH run the following command, remember to change the details with the correct details.

    mysql -u root -p username_database < filename.sql

    you will need the root mysql password.
     
  3. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    Problem:

    I already deleted the site I abcked these up from. All I have are the .gz files. I tried to open them with ZipGenius and they opened fine but were blank. That can't be, however, because one of them's almost 4 MB in size. Any ideas on hwo I can get the data? That 4 MB one is the only one I really care about, it's our customer service data for teh past year... thanks!
     
  4. mark1

    mark1 Well-Known Member

    Joined:
    Jan 26, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Winrar will open it fine, if not then you may need to re download the file, and ensure you dont use a filemanager type program to download it with (IE DAP)

    HTH
     
  5. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    'The archive is either in an unknown format or has been damaged."

    There's no other way to do it? I already deleted the accounts foolishly from the old server so thsi is the only backup I have from anytime recently...
     
  6. mark1

    mark1 Well-Known Member

    Joined:
    Jan 26, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    nope, you may have to use a older backup if you have 1, unless someone else has a better idea, sorry!
     
  7. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Hi,

    I agree with mark1 suggestion that you open the .gz file with WINRAR.

    Since you mention it's 4MB, I suspect they are a TMP folder.
    In in contains:
    AWSTATS, ANALOG, WEBALIZER, WEBALIZERFTP and that folder contain files.

    You really need to be able to untar the .gz file to see the contents.

    I wish you good luck in recovering your files.

    Rgds,
    Vincent
    http://www.eazistore.com
     
Loading...

Share This Page