UBB.Dev
Posted By: BWilliams_dup1 Restore a thread from a backup - 10/11/2004 7:01 AM
I was moving posts around and ended up deleting a thread instead of moving it. I do have a back up copy of the database, but don't want to restore the whole database due to several other posts being made within the couple of hours between me realizing what I did.

Any suggestions?
Posted By: Medar Re: Restore a thread from a backup - 10/11/2004 7:43 AM
If you know the Thread number, you can search the backup file for that specific number.

If not, a snippet of content, or something will have to suffice. At that point you would just copy the entire line that says INSERT INTO w3t_Posts...
Posted By: Anno Re: Restore a thread from a backup - 10/11/2004 9:04 AM
>copy the entire line that says INSERT INTO w3t_Posts...
...into the mysql query window in the administration panel and press "execute query"
Posted By: Medar Re: Restore a thread from a backup - 10/11/2004 2:54 PM
LOL sorry, it was late, my kid started screaming from her bedroom.

Had to run and never got back to the PC to finish my thought!
Posted By: BWilliams_dup1 Re: Restore a thread from a backup - 10/11/2004 6:19 PM
This maybe a little more difficult, but the backup I have is the one done with phpmybackup and is in a .gz format. I have never been in this situation, so I have never needed to restore a backup.
Posted By: Rutto Re: Restore a thread from a backup - 10/11/2004 8:29 PM
If you are on Windows install WinZip and extract the .gz file. You'll have a .sql file. This one can be opened with a text editor and here you can find all the posts like this:

Code
<br /><br />('UBB1', 5711, 5710, 5705, 1039014180, 1039423440, '151.38.109.212', 'Re: A.P.O.', 'Il grande Wolf, vista l\'amicizia che lo lega ad Apo, per aiutarlo a passare meglio i giorni di convalescenza, gli regala un bel puzzle!Apo, guarito, chiama wolf e gli dice:<br />-Lele sono un genio, ci ho messo solo due settimane a finire il puzzle!<br />e Wolf -Genio!?ma se io ne ho uno uguale e ci ho messo due giorni, come fai a dire che sei un genio!<br />-ma se sulla scatola c\'รจ scritto da 2 a 3 anni....  <img border="0" title="" alt="[Un grande sorriso]" src="images/icons/grin.gif" />  <br />Auguroni Apo!!!!!!!!!!!!!!', NULL, '', 'O', 'yes', 'trophy.gif', 'y', 1, 0, 65, NULL, 0, 'markup', NULL, NULL, 461, '0', 0, NULL, 0, 'BIELLO', NULL, NULL, NULL, 0, 0, 0, 1),<br /><br />


Copy the correct one and execute it as sql command in your site.
Posted By: BWilliams_dup1 Re: Restore a thread from a backup - 10/12/2004 6:27 PM
Thanks a bunch !!

I got the 1st post back, which was the most important, but none of the other 3 pages of replies came back.
Posted By: Medar Re: Restore a thread from a backup - 10/12/2004 6:38 PM
You would have to search your w3t_Posts 'archive' for every instance of that Original Post's number.

IE if the B_Number was 14423, then each post on that entire THREAD would have a B_Main of that same number. That should be all the posts in the entire thread.

If it was a large thread, you might spend some time finding them, but you would insert them exactly as you did the original post.
© UBB.Developers