Title: database restore completed with errors
Last modified: August 20, 2016

---

# database restore completed with errors

 *  [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/database-restore-completed-with-errors/)
 * Hi – I ran a restore today after accidentally deleting my website files (arrrgghhhh…)
 * Here’s what happened when I ran the db restore script. What should I do to overcome
   this problem?
 * – Tim
 * Continue Script if needed: [http://[my](http://[my) blog url here]/backwpup_db_restore.
   php
    …………………………………………… and a lot more … here… ERROR: BackWPup database error 
   Duplicate entry ‘31307’ for key ‘PRIMARY’ for query INSERT INTO `ash4_redirection_logs`(`
   id`, `created`, `url`, `sent_to`, `agent`, `referrer`, `redirection_id`, `ip`,`
   module_id`, `group_id` )VALUES ( 31307, ‘2010-05-24 10:33:19’, ‘/askapache-crazy-
   cache-backend.php?_wpnonce=ea8c695667’, NULL, ‘Mozilla/5.0 (compatible; AskApache/;
   +http://www.askapache.com/wordpress/crazy-cache-wordpress-plugin.html)’, ‘[http://www.askapache.com&#8217](http://www.askapache.com&#8217);,
   NULL, ‘74.52.59.242’, 3, NULL ); ERROR: BackWPup database error Variable ‘time_zone’
   can’t be set to the value of ‘NULL’ for query SET TIME_ZONE=@OLD_TIME_ZONE ; .
   ERROR: BackWPup database error Variable ‘sql_mode’ can’t be set to the value 
   of ‘NULL’ for query SET SQL_MODE=@OLD_SQL_MODE ; . ERROR: BackWPup database error
   Variable ‘foreign_key_checks’ can’t be set to the value of ‘NULL’ for query SET
   FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS ; . ERROR: BackWPup database error
   Variable ‘unique_checks’ can’t be set to the value of ‘NULL’ for query SET UNIQUE_CHECKS
   =@OLD_UNIQUE_CHECKS ; . ERROR: BackWPup database error Variable ‘character_set_client’
   can’t be set to the value of ‘NULL’ for query SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;..
   ERROR: BackWPup database error Variable ‘collation_connection’ can’t be set to
   the value of ‘NULL’ for query SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;.
   ERROR: BackWPup database error Variable ‘sql_notes’ can’t be set to the value
   of ‘NULL’ for query SET SQL_NOTES=@OLD_SQL_NOTES ; . 410737 Database Querys done.
   Make changes for blogurl and ABSPATH in database if needed. Restore Done. Please
   delete the SQL file and this script.
 * [http://wordpress.org/extend/plugins/backwpup/](http://wordpress.org/extend/plugins/backwpup/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/database-restore-completed-with-errors/#post-3504467)
 * On Duplicate Keys i can’t do anithing. Tht kames bevore the backup or u have 
   had warrnig on the backup.

Viewing 1 replies (of 1 total)

The topic ‘database restore completed with errors’ is closed to new replies.

 * ![](https://ps.w.org/backwpup/assets/icon-256x256.png?rev=3236141)
 * [BackWPup – WordPress Backup & Restore Plugin](https://wordpress.org/plugins/backwpup/)
 * [Support Threads](https://wordpress.org/support/plugin/backwpup/)
 * [Active Topics](https://wordpress.org/support/plugin/backwpup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backwpup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backwpup/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 1 reply
 * 2 participants
 * Last reply from: [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/database-restore-completed-with-errors/#post-3504467)
 * Status: not resolved