Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: attlebax on May 31, 2017, 09:52:27 AM

Title: Restoring board from backup problem
Post by: attlebax on May 31, 2017, 09:52:27 AM
I do backups on a regular basis but not every day.

Yesterday my board reported a problem when you entered it in smf_boards.frm and it halted immediately. I took to be an error in the MySQL database. The quickest and obvious solution was to restore the last backup.

When I did this I got a 1602 error in MySQL and a report of duplicate items in an index. It reported a location in the file but I soon worked out that it really meant to say, somewhere after this.

I tracked it down in Notepad++ in this part.

INSERT INTO `smf_log_search_subjects`
   (`word`, `id_topic`)
VALUES (0, 73),
   (0, 84),
   (0, 90),
   (0, 94),
   (0, 96),
   (0, 98),
   (0, 101),
   (0, 110),
   (0, 118),
   (01, 45),
   (01, 95),
   (01, 96),
   (01, 98),

   (02, 101),
   (02, 103),
   (02, 104),
   (02, 106),
   (03, 106),
   (03, 109),
   (03, 110),
   (03, 111),
   (03, 112),
   (03, 113),
   (04, 118),
   (05, 66),
   (06, 44),
   (06, 109),
   (07, 111),
   (08, 45),
   (08, 66),
   (08, 67),
   (08, 70),
   (08, 110),
   (09, 95),
   (09, 96),
   (1, 10),
   (1, 17),
   (1, 18),
   (1, 38),
   (1, 73),
   (1, 84),
   (1, 90),
   (1, 94),
   (1, 96),
   (1, 98),


You can see it has (01, 96) and (1, 96) also (01,98) and (1, 98).

I removed the second occurrence of both and saved the file. It restored correctly.

Posted in case you get anything similar.

Attlebax ;)

Title: Re: Restoring board from backup problem
Post by: Kindred on May 31, 2017, 12:19:30 PM
What was the actual error?

Most errors do not require a restored backup to be fixed...