Announcement

Collapse
No announcement yet.

How to restore a mysqldump

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

  • How to restore a mysqldump

    I backup my database using mysqldump --opt -Q

    I am finally setting up a test server to test my much needed upgrade.

    I have the dump file created by mysqldump on my test server. I now have mysql installed and running. I've uploaded my current verison of vb(3.09).

    I did a search on restore here and was pointed to an impex link. I downloaded and configured that before I read it was for importing foreign DB's ....so I have not tried it.
    I'm confused and looking for a bit of guidence.
    Help Please!
    http://www.netcookingtalk.com/forums/


  • #2
    you'll need to create a new database for the test forum. Config.php for the test forums will have to reflect this database/user/pw:
    http://www.vbulletin.com/docs/html/create_database

    then restore the dumped file to that database:
    http://www.vbulletin.com/docs/html/m...tabase_restore

    Comment


    • #3
      Thanks very much. Just the info I needed. I looked at the manual befoore asking, but was looking for a testing setup ....duh!

      I've created a new DB issued the command to read in the mysqlldump db and here is the error I get:

      ERROR 1064 AT LINE 250: you have an error in your SQL syntax near ' 'oooooo\000\00\0'\0'\.....at line 1

      any idea what this means?
      Last edited by Orp; Sun 5 Mar '06, 9:12am.
      http://www.netcookingtalk.com/forums/

      Comment


      • #4
        This means that either the backup file is not complete or there is an error in it. What are the last 5 lines in this backup?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          I tried a tail of the dbbkup.sql file and got garbage. Here is an example of it:
          PuttyPutty^[[?6cPutty....etc.

          the command like used to create this backup is run from cron daily and looks like this:

          /usr/bin/mysqldump --opt vb_db_name > /root/dbbkup/dbbkup4.sql
          http://www.netcookingtalk.com/forums/

          Comment


          • #6
            Are you saying you cannot check the last few lines of this file, or that is the last line?
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment


            • #7
              I did a tail onn the file which normally gives you the last 10 lines of a file. After it kept dumping garbage like the string I showed in the previous post I killed it. So, yes, that is the tail output.
              http://www.netcookingtalk.com/forums/

              Comment


              • #8
                Then this backup would appear to be bad. I'd make a new one.
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment


                • #9
                  Okay. Thanks for the reply. Would you suggest any other msqldump options?
                  I downloaded it as a binary. Should it be ftp'd as an ascii?
                  http://www.netcookingtalk.com/forums/

                  Comment


                  • #10
                    continued from previous post ...

                    I went to my primary server and tailed the mysqldump backup.
                    What I got was a long running sting of numbers and names, all in parens. For example: (40930,'liptons'),(40931,'clove')
                    lots of words all preceded by a number. This output also kept running until I killed it. Looks like words indexed for searching.
                    Does it sound like this is a good dump / backup?
                    http://www.netcookingtalk.com/forums/

                    Comment


                    • #11
                      Originally posted by Orp
                      Okay. Thanks for the reply. Would you suggest any other msqldump options?
                      I downloaded it as a binary. Should it be ftp'd as an ascii?
                      is your database dump gzipped?

                      If the file ends in .sql you have to download it as ascii

                      If it's .gz then use binary

                      Comment


                      • #12
                        Thanks. Mine is .sql so I can move it as ascii.
                        http://www.netcookingtalk.com/forums/

                        Comment


                        • #13
                          Thanks for the help. I now have a test forum to test my upgrade on. Awesome! :thumb:
                          http://www.netcookingtalk.com/forums/

                          Comment

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