Announcement

Collapse
No announcement yet.

step by step database restore from linux to windows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Solved] step by step database restore from linux to windows

    I got problem with restoring my database from the linux server on the windows server 2003 VPS with plesk control panel, so I contact the server support and after importing the database with mysqldumper or import from phpmyadmin or directly from plesk panel I get same error !
    so, I think about after I'm importing this .sql file, where is it going ? so I import it in my local server and search on my PC and find out it will go in one folder and create many files ( tables ).
    so I deside to zip the files in the folder and upoad in rapidshare and restore them in the same folder on my VPS ! and after that I successfully restored my database !
    so, I think to create a tutorial step by step for other friends like me that may have the same problem to help them fix it

    ok, for the first step you should install local server software such as xampp, you can find the setup to download in here (for windows ) here (for linux ) here (for mac os) here (for solaris) and you can see the installation guide in the pages too !

    after installing the xampp , you should download and extract your sql database from the cpanel of your linux server to your PC and move it to your local server root folder.

    help to download the database from cpanel:

    click on the backups



    click on the database you want to download



    extract it on your desktop





    now, type this address on your internet browser and create the database:
    http://127.0.0.1/phpmyadmin

    like the picture, just type the name of the database and click on the "create" button.



    if everything goes well, you can see this page:



    now, download "bigdump.php" from here and edit it with PHP editor software and set the information of your database in phpmyadmin you created in last step like this:

    Code:
    $db_server   = 'localhost';
    $db_name     = 'forum';
    $db_username = 'root';
    $db_password = '';


    leave the "$db_password" blank!
    save the changes and close the php editor.

    now, copy both "Backup.sql" and "bigdump.php" from your desktop to this address on your pc ( by default, xampp install in the c" and the folder I wrote in here, so if you changed the installation default setting, this address won't work for you! ).

    Code:
    C:\xampp\htdocs


    Attached Files

  • #2
    after successfully copy the files in the "htdocs" folder, type this address in your internet browser:

    Code:
    http://127.0.0.1/bigdump.php
    and you should see this page:



    and after that, simply just click on the "Start Import" in front of the "Backup.sql" :



    then it will start importing the "Backup.sql" to the database you created in "phpmyadmin" like this picture:



    so, wait to successfully complete the process so you can see this page:



    now, close the browser and go to this directory on your PC and rar/zip the folder named "forum" or anything you named the database in "phpmyadmin":

    Code:
    C:\xampp\mysql\data



    now, upload the zip/rar file in some upload center like http://rapidshare.com or any other and save the download link on your PC , we need it in later

    now, login to your Plesk control panel of the VPS and follow the steps:

    1- click on the domains:



    2- click on the domain name you set before and want to add the database in it:



    3- and now, click on the databases



    4- click on "Add New Database"

    Comment


    • #3
      5- type the name of your database and click on "OK"



      6- now, in the next page, click on "Add New Database User"



      7- fill the information ( username, password ) and click on "OK"



      ok, done !
      now you should connect to your VPS via Remote Desktop and download the "forum.zip/rar" you uploaded from your PC on the VPS and extract it on the desktop:



      now, in the VPS, search for the folder got same name of your database name on the VPS, as you can see in step 5 , my database name is :

      Code:
      behzad_forum
      and I found it in this address of my VPS:

      Code:
      C:\Parallels\Plesk\Databases\MySQL\Data
      now, everything you need to do is open the folder on your desktop and copy all of the contains to the database folder on your VPS, likt the picture:

      1- copy all of the folder contains on the desktop



      2- go to the database folder and paste all of the data




      Done !!!

      this is the way when I try to restore the database from linux server to windows VPS after try to Import directly from plesk control panel, using mysqldumper, phpmyadmin import page, bigdump.php, and manymore way that I know and the support of the server told me and I get error !

      hope this tutorial help othe people like me !

      All The Best
      Behzad Varedi

      Comment


      • #4
        1. You have included 27 images in your message. You are limited to using 10 images so please go back and correct the problem and then continue again.

        Images include use of smilies, the BB code [img] tag and HTML <img> tags. The use of these is all subject to them being enabled by the administrator.
        that's why I sent 3 posts.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X