• I am moving my blog db from one server to another. I’ve upgraded to the most recent version from 1.5. After uploading the shell WP to the new server I backuped the db but had trouble restoring it. I got an error message attempting to restore from my hard drive. Then I tried copying and pasting it in but got errors on that as well.

    Can anyone help me stop the madness? 🙂

    I’d really appreciate your help.

Viewing 15 replies - 1 through 15 (of 23 total)
  • What are the exact error messages?

    Thread Starter ealvin

    (@ealvin)

    Thanks Podz, I appreciate your help.

    When I attempted to restore from the file on my drive I get this message…

    Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/read_dump.lib.php on line 91

    If you need the error from the copy and paste let me know and I’ll try again and get that for you.

    That looks like the file is too big.
    What error happens when you copy/paste?

    Thread Starter ealvin

    (@ealvin)

    The file size is 8478KB.

    Unlike in your Guide example I don’t have a Create Database, Use Database command.

    Here’s my error message…

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Table structure for table blacklist

    DROP TABLE IF EXISTS blacklist‘ at line 1

    Are you using Notepad++ to open the sql file? Other programs can cause faults.
    http://notepad-plus.sourceforge.net/

    Have you tried zipping the sql file?

    Do you still have access to where it was originally?

    Thread Starter ealvin

    (@ealvin)

    Yes, I used Notepad to open the file.

    I’m not sure what you mean by …

    “notepad-plus.sourceforge.net/”

    I have a zipped version of the file I made at the same time, if that’s what you’re referring to when you asked if I’ve tried zipping the file.

    Yes, I still have access to the source location.

    Thread Starter ealvin

    (@ealvin)

    Hi, I’m afraid this post may have gotten lost. It’s been over 48 hours since I’ve had a reply.

    Thanks for any help you can offer.

    Windows Notepad isn’t up to the job here – by a long way

    http://www.jujusoft.com/jujuedit/
    Install that.

    Open the Unzipped .sql file with jujuedit and then try copy/paste chunks into the sql query box.
    If the first few go well, you should be fine and you can copy/paste a few hundred lines at a time.

    Thread Starter ealvin

    (@ealvin)

    Podz, cutting and pasting is a horrible job. It takes forever, and that’s copying a thousand lines at a time.

    I’ve had a couple of occasions where I’ve lost my highlight. The second time just happened. I think I know where the last cut started but I’m not 100% sure. I’m about 20% through.

    What would you advise? Should I start over from the beginning or should I continue (if I’ve left out a line or two, is there a way to figure out what’s missing after everything has been copied over?)?

    Thanks for your help.

    I just had to restore my db as well. It’s pretty easy

    Just extract the .sql file to your desktop, right-click and open in (in WinXp) with Wordpad (comes standard with windows)

    You’ll see a decent structurized file compared with the notepad version (which is too cluttered)

    Go to PHPMyAdmin, log in to your db, click the SQL button

    and start pasting it in smaller sections. (max upload to MySQL is 2MB, browsers don’t support more, hence the time-out message you got)

    Paste all the categories first, then check if they are created. Next you start by selecting a chunk of lines. Make sure you respect the code, and that you select everything of a selected line. I did it per 200 lines (more or less)

    Repeat until you’re at the end of the .sql file.

    It took me 20 minutes.

    Good luck

    Thread Starter ealvin

    (@ealvin)

    Coolzor,

    Thanks for your help. What specifically do you mean by “You’ll see a decent structurized file compared with the notepad version (which is too cluttered)”?

    I’m not sure how to distinguish the structurized file.

    Notepadwillhaveallthelinesjustinonebigmess
    whereas WordPad will display them as they should be.

    For large files though, jujuedit is by far the better program – I have opened an 80MB database with it which other programs just crashed on.

    Thread Starter ealvin

    (@ealvin)

    Podz, did you see my post two posts up? (BTW, I’m using the jujuedit, as per your suggestion)

    In that post I stated “Podz, cutting and pasting is a horrible job. It takes forever, and that’s copying a thousand lines at a time.

    I’ve had a couple of occasions where I’ve lost my highlight. The second time just happened. I think I know where the last cut started but I’m not 100% sure. I’m about 20% through.

    What would you advise? Should I start over from the beginning or should I continue (if I’ve left out a line or two, is there a way to figure out what’s missing after everything has been copied over?)?”

    Coolzor said, “You’ll see a decent structurized file compared with the notepad version (which is too cluttered)”

    I responded with, “What specifically do you mean by “You’ll see a decent structurized file compared with the notepad version (which is too cluttered)”?

    I’m not sure how to distinguish the structurized file.”

    That’s where I am now. I’d love your (or anyone else’s guidance).

    Thanks.

    It is indeed a horrible job – I’ve done it several times.

    Do you have SSH access (command line) to the server? If you do life becomes easier.

    Do you have access to the original database?

    Does the exported file contain any stats data which could be dumped?

    A structurizes file is where you can see the different sections, divided by —- lines and other clear characters, where every new command is a new line. For example my file starts like this in WordPad:

    # WordPress MySQL database backup
    #
    # Generated: Tuesday 16. May 2006 12:27 CEST
    # Hostname: localhost
    # Database: xxxxxxxx
    # ——————————————————–
    # ——————————————————–
    # Table: wp_categories
    # ——————————————————–

    #
    # Delete any existing table wp_categories
    #

    DROP TABLE IF EXISTS wp_categories;

    #
    # Table structure of table wp_categories
    #

    CREATE TABLE wp_categories (
    cat_ID bigint(20) NOT NULL auto_increment,
    cat_name varchar(55) NOT NULL default ”,
    category_nicename varchar(200) NOT NULL default ”,
    category_description longtext NOT NULL,
    category_parent bigint(20) NOT NULL default ‘0’,
    category_count bigint(20) NOT NULL default ‘0’,
    PRIMARY KEY (cat_ID),
    KEY category_nicename (category_nicename)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;

    #
    # Data contents of table wp_categories
    #

    that’s a decent structure. Then you have lines that start with INSERT INTO, followed by the place they belong to. (categories, comments, …)

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Restore Nightmare’ is closed to new replies.