Hi,
I prefer to take the backup manually. For that refer this article:
http://codex.ww.wp.xz.cn/WordPress_Backups#Database_Backup_Instructions
Also use this plugin to remove duplicate posts:
http://ww.wp.xz.cn/extend/plugins/delete-duplicate-posts/
Thanks,
Shane G.
Before you restored your database to your local machine, did you drop the WordPress tables such as wp_posts etc?
the backup sql has table drops in it. But the first time it failed I thought there may be some cross table referential integrity so I did a manual drop of all tables then ran the import from the sql and it failed with same duplicate error on posts. So I deleted dup recs from backup sql and ran and it worked. But when I went to look at blog it was totally screwed.
So then I ran import of backup from local system which restored to how it was.
Then resorted to using tools/export of xml posts file. Manually deleted posts from local blog and imported xml posts which seems to hve worked OK.
But how come I have dup records in SQL backup? This should not happen or am I wrong about that?
just to follow up. I dumped the database using phpMyAdmin and loaded that in local setup and it has worked fine.
Also checked that dumped data and there are no duplcayes in it.
So I don’t why I got them before. It should not be possible to have duplicate primary keys. Could be something to do with the WP Backup plugin but I really don’t know.
That delete duplicate post plugin is dangerously mis-leading. Attachments are entered in posts table. So a post and attachment can have the same title quite validly. And in fact that is the case for me but I don’t want those duplicate title records deleting because they are valid. It needs to look for duplicate post table ID which is a corruption of the table.
Anyhow problem is resolved. I will use phpMyAdmin for table dumps.
Thanks