2011-01-24, 08:20 PM
Pages: 1 2
2011-01-24, 08:33 PM
If on the old database backup the posts are there, then yes. I recommend you set it so only admins can delete posts in the future, mods can hide them anyway.
Also, I don't recommend going to an old database backup, your entire forum may lose posts.
Also, I don't recommend going to an old database backup, your entire forum may lose posts.
2011-01-24, 08:35 PM
Thanks
But I want a way to retore deleted post WITHOUT loosing anything
But I want a way to retore deleted post WITHOUT loosing anything
2011-01-24, 08:36 PM
Sorry, this really isn't possible.
2011-01-24, 09:09 PM
Very sad to hear it
Can I restore at least ONE thread by inserting it into database via a sql query
Because, that user deleted a thread and all valuable posts and replies within this thread have been deleted as well
Can I restore at least ONE thread by inserting it into database via a sql query
Because, that user deleted a thread and all valuable posts and replies within this thread have been deleted as well
2011-01-24, 09:12 PM
(2011-01-24, 08:36 PM)Derek M. Wrote: [ -> ]Sorry, this really isn't possible.
Um, yes it is. You are able to restore just 1 table.
2011-01-24, 09:25 PM
2011-01-24, 09:33 PM
Yes, and you can do that.
Create a totally new database, import the backup to it. Then, run these queries:
Four things to do.
Backup your current posts and threads tables first.
Change dest_db to the name of your normal database.
Change new_db to the name of the database you just made.
Change the X to the ID of this user.
These queries will reimport the threads and posts made by this user. I just need to add another query to add all the posts inside threads this user created
Create a totally new database, import the backup to it. Then, run these queries:
INSERT INTO `dest_db`.`mybb_posts` SELECT * FROM `new_db`.`mybb_posts` WHERE `uid` = 'X';
INSERT INTO `dest_db`.`mybb_threads` SELECT * FROM `new_db`.`mybb_threads` WHERE `uid` = 'X';
Four things to do.
Backup your current posts and threads tables first.
Change dest_db to the name of your normal database.
Change new_db to the name of the database you just made.
Change the X to the ID of this user.
These queries will reimport the threads and posts made by this user. I just need to add another query to add all the posts inside threads this user created
2011-01-25, 10:33 AM
Thanks a lot MattRogowski
Now there is a hope
But when I run:
Now there is a hope
But when I run:
INSERT INTO `mybb16`.`mybb_posts` SELECT * FROM `test`.`mybb_posts` WHERE `uid` = '2196'
it returns#1136 - Column count doesn't match value count at row 1
Any idea?2011-01-25, 10:49 AM
It seems that the posts table in your main database has additional columns to the posts table in your backup. Have you added any plugins since making that backup that may have added a column to the posts table??
Try running these queries instead. I've already made the edits you need for you.
Try running these queries instead. I've already made the edits you need for you.
INSERT INTO `mybb16 `.`mybb_posts` SELECT `pid`, `tid`, `replyto`, `fid`, `subject`, `icon`, `uid`, `username`, `dateline`, `message`, `ipaddress`, `longipaddress`, `includesig`, `smilieoff`, `edituid`, `edittime`, `visible`, `posthash` FROM `test`.`mybb_posts` WHERE `uid` = '2196';
INSERT INTO `mybb16 `.`mybb_threads` SELECT `tid`, `fid`, `subject`, `prefix`, `icon`, `poll`, `uid`, `username`, `dateline`, `firstpost`, `lastpost`, `lastposter`, `lastposteruid`, `views`, `replies`, `closed`, `sticky`, `numratings`, `totalratings`, `notes`, `visible`, `unapprovedposts`, `attachmentcount`, `deletetime` FROM `test`.`mybb_threads` WHERE `uid` = '2196';
Pages: 1 2