# Restore User

**URL:** <https://forums.plex.tv/t/restore-user/197007>\
**Category:** General Discussions\
**Created:** [June 26, 2017, 4:14am UTC](https://forums.plex.tv/t/restore-user/197007 "2017-06-26T04:14:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![reddwarfcrew](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@reddwarfcrew](https://forums.plex.tv/u/reddwarfcrew)\
**Post date:** [June 26, 2017, 4:14am UTC](https://forums.plex.tv/t/restore-user/197007/1 "2017-06-26T04:14:50Z")

</div>

So I’ve had a bit of a nightmare and deleted a managed user from Plex home. I’ve set them back up but they’ve lost their watch history. I performed a restore of the plex folder on synology but that hasn’t brought it back either.

Looking at PlexPY I can see that ‘new’ user has a different userid to the old one. Is there a way to get the old user back?

Thanks

---

<div class="post-metadata">

**Author:** ![Night](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@Night](https://forums.plex.tv/u/Night)\
**Post date:** [June 26, 2017, 6:50am UTC](https://forums.plex.tv/t/restore-user/197007/2 "2017-06-26T06:50:27Z")

</div>

Keep in mind PlexPy is not a plex product but a 3rd party addon, there is no easy way to restore logs in PlexPy, since you deleted the user, your best bet was to go in to plexpy database and change userid from new to old

UPDATE table\_name  
SET plexpy=REPLACE(column\_name,‘old\_user\_id’,‘new\_user\_id’);

That _should_ work, no guarantees though

---

<div class="post-metadata">

**Author:** ![reddwarfcrew](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@reddwarfcrew](https://forums.plex.tv/u/reddwarfcrew)\
**Post date:** [June 26, 2017, 5:20pm UTC](https://forums.plex.tv/t/restore-user/197007/3 "2017-06-26T17:20:26Z")

</div>

Thanks, I was more interested in the watch history in Plex itself. Is there a similar SQL I can run on the Plex db so that all the TV Shows etc that have been watched and be re-flagged?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 7, 2020, 11:27pm UTC](https://forums.plex.tv/t/restore-user/197007/4 "2020-01-07T23:27:12Z")

</div>


