Announcement

Collapse
No announcement yet.

problems restoring backup...

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

  • problems restoring backup...

    I'm taking over the database of a forum that is closing down soon...

    I'm going to use impex to import the users from the old database, I don't want the posts...just the userbase. We'll call that the "source"... and my database is the "target"

    Both forums are running 3.5.3 (patched)
    MYSQL 4.0.25-standard
    PHP 4.4.0
    Apache v1.3.33

    What I'm doing is:

    1. made backup of source (tried in SSH and via the ACP)

    2. made backup of target (in ssh)

    Trying to restore the backups into new databases to work with using Impex... was going to restore each into a separate database and then import the user base from the source to the target.

    However, when trying to restore the databases (using ssh) I'm getting an error message on both, though they are different.

    When restoring the source, I get:

    -bash-2.05b$ mysql -u ******* -p database_name < database_backup.sql
    Enter password:
    ERROR 1064 at line 2: 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 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
    `userid` int(1

    When restoring the target, I get:

    -bash-2.05b$ mysql -u ********** -p target_database < database_file.sql
    Enter password:
    ERROR 1064 at line 2374: 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 'desc text NOT NULL,
    parent int(10) unsigned NOT NULL default


    Using mysql -u testdb_username -p testdb_name < /path/to/forum_data.sql
    to restore and:

    and this to backup:

    mysqldump --user=******* --password=******** --quick --add-drop-table --add-locks --extended-insert --lock-tables --all forums_database | gzip > /home/*******/backup/backup-`date -I`.gz

    I tried backing up in the ACP, and received the same errors when restoring the file...

    Any ides...?
    Last edited by cybermomcafe; Wed 22 Mar '06, 4:55pm.

  • #2
    The SQL Syntax error means that there is something wrong with your backup file. What are the first 5 lines of your backup file?
    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


    • #3
      Here's the first part of both backup files:

      This is from the source backup (the source is running a slightly older version of mysql) created on someone elses server (I have ssh access)

      -- MySQL dump 10.9
      --
      -- Host: localhost Database: source_database
      -- ------------------------------------------------------
      -- Server version 4.1.14-standard
      /*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
      /*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
      /*!40101 SET @[email protected]@COLLATION_CONNECTION */;
      /*!40101 SET NAMES utf8 */;
      /*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
      /*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
      /*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
      /*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;

      This is the target database created on my server (also have ssh access)

      -- MySQL dump 9.11
      --
      -- Host: localhost Database: target_database
      -- ------------------------------------------------------
      -- Server version 4.0.25-standard
      Last edited by cybermomcafe; Thu 23 Mar '06, 4:24am.

      Comment


      • #4
        I need to see the actual line with the 'CURRENT_TIMESTAMP' setting.
        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 got it resolved... recompiled mysql to 4.1.14 on my server and it seems to have fixed it

          Thanks though!

          Comment

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