MyBB Community Forums

Full Version: User account restoration...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

Firstly a big thanks to all who have helped developed MyBB and make it into the great forum software that it is Wink


Just a quick question...I was fiddling around removing some users from groups and accidently deleted a user Blush

I have tried to re-create the user but naturally they have now lost all their posts, rep, etc. Is there any way to restore a deleted users info, either from backups or otherwise?


Thanks in advance for any info that may assist in resolving this epic blunder Big Grin
You could restore from a backup if you have one but you would loose any new changes after that backup was taken. How good are you with databases? Depending on how many posts there are you could plausibly go through and manually set post associations with that user again, possibly using parts of your backup for sections that have not changed. Otherwise say sorry to the user and ask them to register again Toungue
I quite like this method... make a new database and import your backup. Then go to export. On the export page, there's an option called 'Export type', change this to REPLACE. You'll now get a new, slightly different backup, where all the queries start with REPLACE INTO instead of INSERT INTO. Now, import this new backup into your main database. Anything from the backup that is already in the main database will be inserted 'over' it, basically just insert the same data again, but anything that's missing, i.e. the user, their posts, their threads etc etc will just be slotted in, and it should be back to how it was, and you won't lose anything.

Also make sure you backup your current database first, just in case my logic isn't right here Toungue