WordPress.org

Support

Support » How-To and Troubleshooting » Database backup not working as expected

Database backup not working as expected

  • kimchiandbasil
    Member

    @kimchiandbasil

    Hi all,

    I had to reinstall wordpress on my website (kimchiebasilico.it) and I did a database backup of all tables before exporting .sql and .xml file

    I dropped all the tables (step needed to re-install wordpress) and After re-installing the same version of wordpress, I imported the backup files in myphpadmin but my posts are not imported but only the comments.

    I got an error message saying that there is a duplicate primary key. I have checked the config file and all the user, password and details of database are correct as well as the tables prefix.

    Am I missing something?

    Thanks!

    V

Viewing 4 replies - 1 through 4 (of 4 total)
  • designsimply
    Member

    @designsimply

    Sounds to me like the previous tables might not have been dropped completely. Are you sure they were?

    Did you try running the database import more than once?

    If you’re still having trouble, it might help to post a copy of the exact error messages here for reference.

    kimchiandbasil
    Member

    @kimchiandbasil

    Yes I have tried a few times, but with same results. I will post the screenshot

    kimchiandbasil
    Member

    @kimchiandbasil

    this is the error message i got

    SQL query:

    — — Dumping data for table wp_comments — INSERT INTO wp_comments (comment_ID, comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_karma, comment_approved, comment_agent, comment_type, comment_parent, user_id) VALUES (35, 13, ‘Franco’, ‘franco.ravaglioli@naturando.it’, ”, ‘212.183.179.104’, ‘2013-11-04 12:28:34’, ‘2013-11-04 12:28:34’, ‘ciao. ho vissuto a seoul per tre anni…….vent”anni fa……e vorrei ritrovare la ricetta per fare il sujongua (quella splendida bevanda rinfrescante a base di cachi e cannella e altro….). tu lo sai fare? grazie e 고맙습니다’, 0, ‘1’, ‘Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; BTRS100200; GTB7.5; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)’, ”, 0, 0), (37, 13, ‘Vincenzo’, ‘kimchiandbasil@gmail.com’, ”, ‘110.12.95.118’, ‘2013-11-05 06:50:48′[…]

    MySQL said: Documentation

    #1062 – Duplicate entry ’35’ for key ‘PRIMARY’

    designsimply
    Member

    @designsimply

    If you tried importing more than once and the first one only worked partially, that might explain the “Duplicate entry” message. Are you sure the tables were completely dropped before each import attempt?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database backup not working as expected’ is closed to new replies.