Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2006
    Posts
    9

    Default Database restoration

    Hello,

    I am having some trouble understanding what I need to do.

    Using cPanel's backup feature, I have already downloaded a backup copy of one MySQL database (in compressed GZ format) to my local machine. I've tried using either Winzip or WinRAR to extract the content but all I am seeing is a file within that has unknown file extension.

    I need to uncompress the database into a folder with all table still intact. Ie. a bunch of file ending with MYD, MYI, and FRM extensions.

    What tools and steps are necessary to achieve this objective?

    I am using Windows 2000.

    Thanks,

    Devin

  2. #2
    Member
    Join Date
    Apr 2003
    Posts
    479

    Default

    The file that you downloaded and gunzipped should be a mysql dump, that is a text file containing the information to restore the database.

    Try opening it in notepad or a text editor to view it.

    To restore it, FTP it to your server, then SSH to your server and use the command:
    Code:
    mysql -u user_name -D db_name -p < the_sql_file
    Or upload it with phpMyAdmin's SQL tab.

    cPanel does not provide you access directly to the raw MYI, etc database files which is probably for the best.

  3. #3
    Member
    Join Date
    Jul 2006
    Posts
    9

    Default

    Hi elleryjh,

    Thank you for the instruction. Is it possible to do a dump directly from MySQL server already installed on my local machine?

    My shared webhost provider do not permit shell access or has the phpMyAdmin tool available.

    Thanks,

    Devin

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    4

    Default Backup

    If you have root access, yo can try this script
    http://www.alexgomes.com/blog/software/amb/

  5. #5
    Member
    Join Date
    Jul 2006
    Posts
    9

    Default

    Hello, I had a look at the script and its doing the exact opposite of what I am trying to accomplish.

    I've found some following information in MySQL Reference Manual:

    You can also store the dump in a file, transfer the file to the target machine, and then load the file into the database there. For example, you can dump a database to a compressed file on the source machine like this:

    shell> mysqldump --quick db_name | gzip > db_name.gz

    Transfer the file containing the database contents to the target machine and run these commands there:

    shell> mysqladmin create db_name
    shell> gunzip < db_name.gz | mysql db_name


    I am repeatly receiving SQL syntax error message. I don't know what the problem is with my syntax as I have already tried everything I can think of, including full path.

    I am thinking that this issue is more about MySQL rather than cPanel's so I will post my question on MySQL forum.

    Thanks,

    Devin

Similar Threads & Tags
Similar threads

  1. long restoration
    By sime in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-26-2006, 09:20 PM
  2. backup restoration
    By geneticfreak in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-28-2005, 03:11 AM
  3. backup restoration ??
    By chadi in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-06-2004, 12:35 PM
  4. Please help me! MySQL database restoration nightmares!
    By Ganga in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-17-2003, 04:55 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube