Can I Restore a Deleted Profile?

Ken Rich
Ken Rich
@ken-rich
10 years ago
926 posts
Ok - laugh and declare me "King of the Noobs", but I accidentally deleted someone's account. A valued client, no less.

I was working late and went to remove them from a quota, but deleted their whole account instead. D'OH!!!

At any rate, I have the DB and System Back-up module running. I see the restore profile function, but it assumes the account is at ACP -> Users -> Profile Browser with an ID assigned. I deleted the account altogether, so there is no longer an ID.

I also have a back-up from the server I can work with, but I don't know how to put back 1 individual profile from that.

Does anyone have any ideas that can save my bacon?
jpg
 •  42KB




--

Ken Rich
indiegospel.net

updated by @ken-rich: 02/21/15 08:14:10PM
brian
@brian
10 years ago
10,148 posts
Do you know what their profile_id was? If you do you can restore it in the "Restore profile IDs" tool - make sure the "Restore Profiles" option is NOT checked and enter just their profile_id in the Restore profile IDs field.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
10 years ago
926 posts
Hi Brian,

Cool - I am digging through my back-ups trying to find her ID. I can see in the logs where I deleted her but it only gives her name.

As a feature request, it might be nice to include the ID of who is deleted, then it would be easy to put them back if necessary.


--

Ken Rich
indiegospel.net
brian
@brian
10 years ago
10,148 posts
Ken_Rich:
Hi Brian,

Cool - I am digging through my back-ups trying to find her ID. I can see in the logs where I deleted her but it only gives her name.

As a feature request, it might be nice to include the ID of who is deleted, then it would be easy to put them back if necessary.

Yeah good idea - I'll check that out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
10 years ago
926 posts
Hi Brian,

I finally found her ID and ran the restore tool. It did put her media folder back on the server, but her account is still missing. If I search her name, she isn't listed in the system.

So it seems the restore function is only a partial solution, how do I get her back all the way?

I'm thinking perhaps PHP MYadmin and manually adjusting the tables?


--

Ken Rich
indiegospel.net

updated by @ken-rich: 01/21/15 10:28:33AM
brian
@brian
10 years ago
10,148 posts
Ken_Rich:
Hi Brian,

I finally found her ID and ran the restore tool. It did put her media folder back on the server, but her account is still missing. If I search her name, she isn't listed in the system.

So it seems the restore function is only a partial solution, how do I get her back all the way?

I'm thinking perhaps PHP Admin and manually adjusting the tables?

No - you should not have to do that. If you go into your Developer Tools -> Database Admin and look in the jr_jrprofile_item_key table do you see _item_id entries for the profile?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
10 years ago
926 posts
Hi Brian,

That ID (785) is not there. It goes from 784 to 786 but 785 is missing.

The media folder for 785 was put back by the DB restore tool and I can see it in the c-panel, but it's apparently not registered in the database.

What do I do next?


--

Ken Rich
indiegospel.net
brian
@brian
10 years ago
10,148 posts
I am just looking at the code and right now it is only restoring the media - NOT the database info for that profile. And thinking about this more, it would actually be very tricky to restore just a single ID from the backup, since the backup SQL files are made with mysqldump (which does the tables as a MULTI insert statement).

So right now I'm not sure what can be done other than fully restoring from last nights backup.

Sorry!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
10 years ago
926 posts
Hmmmm... I don't want to get into restoring everything, just to get one thing. It could go badly and then I'd really have troubles.

Since she is a Ning migrant, do you think Paul might know a way of reimporting her profile???

I still have the JSON and her media is already on the server. It seems to me that might work, but I've never used the import tool.


--

Ken Rich
indiegospel.net
brian
@brian
10 years ago
10,148 posts
Ken_Rich:
Hmmmm... I don't want to get into restoring everything, just to get one thing. It could go badly and then I'd really have troubles.

Since she is a Ning migrant, do you think Paul might know a way of reimporting her profile???

I still have the JSON and her media is already on the server. It seems to me that might work, but I've never used the import tool.

Yeah he might be able to put a small "hack" in just to go with that profile id - that would be the best bet.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
10 years ago
926 posts
Thanks Brian...


--

Ken Rich
indiegospel.net