Title: [Plugin: BackUpWordPress] Error on database restore
Last modified: August 20, 2016

---

# [Plugin: BackUpWordPress] Error on database restore

 *  [Pewit](https://wordpress.org/support/users/pewit/)
 * (@pewit)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/)
 * I tried to import the data backup into an existing WP database and received the
   error below. I also received the same error when I imported into a new database.
 * The rest of the database seems to import OK. Any suggestions?
 * MySQL Version 5.1.63-cll
    PHP version 5.2.17 WordPress 3.4.1.
 * > SQL query:
   >  # # Data contents of table wp_eom_dates (1 records) # INSERT INTO`
   > wp_eom_dates` VALUES ( 1, 1, 2012 -07 -1505 :52 :18, ‘2014-08-09 14:00:00’,‘
   > 2014-08-16 16:00:00’ ) ;
   > MySQL said: Documentation
   >  #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 ’05:52:18, ‘2014-08-09 14:00:00’, ‘2014-08-16 16:00:00′)’ at line
   > 5
 * [http://wordpress.org/extend/plugins/backupwordpress/](http://wordpress.org/extend/plugins/backupwordpress/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Pewit](https://wordpress.org/support/users/pewit/)
 * (@pewit)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898033)
 * The full SQL statement in the SQL backup file is
 * >  #INSERT INTO `wp_eom_dates` VALUES (1, 1, 2012-07-15 05:52:18, ‘2014-08-09
   > 14:00:00’, ‘2014-08-16 16:00:00’)
 * There is a space between the date and time (2012-07-15 05:52:18) and yet somehow
   these are being interpreted as being one string in the import, hence (2012 -07-
   1505 :52 :18) with no space between 15 and 05.
 * What delimiter should be there or is there a workaround by removing the time 
   and leaving the date alone?
 * Or is there another error?
 *  Thread Starter [Pewit](https://wordpress.org/support/users/pewit/)
 * (@pewit)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898161)
 * The problem is some of the dates don’t have single quotes around them.
    Now fixed
   and website back up.
 * Is this an error caused by the backup process or by errors in the database?
 *  Plugin Author [Tom Willmot](https://wordpress.org/support/users/willmot/)
 * (@willmot)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898204)
 * Hmm, I’m not sure to be honest.
 * Those are custom tables that I assume came from a plugin.
 * Could you look at the plugin and see if it’s create table syntax is correct?
 * You could also try manually doing a database dump from the server and see if 
   that has the same issues.
 *  [Fred Chapman](https://wordpress.org/support/users/fwchapman/)
 * (@fwchapman)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898365)
 * I am having exactly the same problem, and it is because the MySQL database dump
   created by BackUpWordPress does not enclose DATETIME values in delimiters. Every
   other site backup or site export method I’ve tried lately (cPanel, the Duplicator
   plugin for WordPress, the DesktopServer Premium development environment) quotes
   DATETIME values.
 * Tom, can you please update BackUpWordPress to do the same? Based on what other
   backup software does, this seems to be standard practice.
 * Thank you,
 * Fred Chapman
 *  [Fred Chapman](https://wordpress.org/support/users/fwchapman/)
 * (@fwchapman)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898366)
 * **CORRECTION**
 * I mistakenly assumed that **datetime** and **timestamp** values were treated 
   the same way by this plugin, but that’s not the case. I just double-checked a
   database backup which I created with this plugin, and **datetime** values _are_
   enclosed in quotes. It’s **timestamp** values which are _not_ enclosed in quotes,
   and that’s what causes the syntax error when I try to import a database backup
   in phpMyAdmin.
 *  [Fred Chapman](https://wordpress.org/support/users/fwchapman/)
 * (@fwchapman)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898367)
 * **WORKAROUND**
 * I developed a workaround for the unquoted **timestamp** problem and posted it
   here:
 * [http://wordpress.org/support/topic/workaround-importing-unquoted-timestamp-values](http://wordpress.org/support/topic/workaround-importing-unquoted-timestamp-values)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: BackUpWordPress] Error on database restore’ is closed to new
replies.

 * ![](https://ps.w.org/backupwordpress/assets/icon-256x256.jpg?rev=1105225)
 * [BackUpWordPress](https://wordpress.org/plugins/backupwordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/backupwordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/backupwordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/backupwordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backupwordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backupwordpress/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [delimiters](https://wordpress.org/support/topic-tag/delimiters/)
 * [Import](https://wordpress.org/support/topic-tag/import/)
 * [phpmyadmin](https://wordpress.org/support/topic-tag/phpmyadmin/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 6 replies
 * 3 participants
 * Last reply from: [Fred Chapman](https://wordpress.org/support/users/fwchapman/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-backupwordpress-error-on-database-restore/#post-2898367)
 * Status: not resolved