Re-install and restore Plex on QNAP

Server Version#: PlexMediaServer-1.16.2.1297-4b7ace214-x86_64.qpkg
Player Version#: N/A

Hi All,

Until yesterday, I had a fully functional PMS (see version above) installed on a QNAP NAS with lots of content already indexed, with progress marks, etc.
For other reasons, I uninstalled the app without thinking that it could cause any harm. I thought that all my libraries, progress, other metadata, i.e. everything else remain intact. However, after the un- and re-install, I see all this data is gone.

I looked into the /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex media Server folder, and I see all files are dated yesterday evening (when the above happened) and I cannot see any folders that would contain my previous library indexes.

I don’t have any externally saved backup.

Since this happened, nothing changed on the hard drive. There is no data in the recycle bin.
Is there any way to restore my pre-uninstall state? Maybe Testdisk? If Testdisk has a chance, what folder(s) to undelete?

Thanks.

In your previous install did you specify a user path to create backups of the PMS database ?

https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Nope, as far as I remember.

If I may add to MoodyBlue,

I take it you would like to see a separate “PlexData” share, visible in FileStation, which contains all your metadata, so you can uninstall/reinstall/change version safely, (here’s the catch – there’s always a catch :wink: ) even if it negates using QNAP’s “Migrate to” functionality ?

Try this, but nobody can grant success.

Unfortunately PMS’s distro for QNAP. unlike the Synology distro, deletes PMS metadata when PMS is deleted. Chuck is trying to fix this, but who already suffered the pain has no solution.

If I may augment here again ?

I just had a conversation with our team lead.
My schedule has been adjusted to allow me to make QNAP my priority.

I will now create the following: ( I ask for input & concurrence before making a formal release )

When installing PMS, the installer will:

  1. Search for an existing PlexData directory. If one is found, regardless of location, use it.
  2. None having been found create the PlexData share on the primary volume
  3. Link the new or existing PlexData share into the installed binaries

What this provides:

  • Ability to move the PlexData share to whichever volume is desired (PMS stopped first)
  • Freedom to uninstall PMS and downgrade without loss of data

What this removes:

  • Ability to move metadata via the “Migrate to” function of QTS. Only the binary code will be moved. (good if your primary volume is M.2 SSD because all writing will be done on the PlexData volume).
  • Ability to wipe clean automatically by uninstalling Plex. Manual deletion through FileStation will be required.
1 Like

Thank you guys, I appreciate your efforts.
Especially, if in the future metadata will not be deleted when PMS is deleted.

I understand that currently PMS on QNAP deletes PMS metadata when PMS is deleted.
But I guess the folder containing that metadata may somehow be undeleted with an external tool like EaseUs as moody_blue links or with Testdisk as I googled.
So, can you tell me which folder to look for to undelete with such a tool?

On Linux, when files are deleted, there is no recovery. This is the nature of an ext4 filesystem.

The same behavior would exist if a share or directory. What’s gone is gone UNLESS there is a volume snapshot.

That said… Recovering a snapshot also recovers the PMS version uninstalled so it would be a simple “undo” and not achieve the desired effect.

A proper backup, which would be more easily accomplished by being in a cleanly visible share (or how package PMSLibShare currently does it) is the best way to backup and restore data

Thanks ChuckPA, that’s bad news for me now.
Anyway, what would be the path to PMS metadata on QNAP (assuming default settings have not been changed)?

Depends on disk setup

See Q11 in the FAQ:

Also this might be helpful:

@dane22, I’m looking specifically for the folder where all metadata (i.e. artwork, manually added data, progress, etc.) is stored, not the general PMS folder.

My PMS is installed at /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/ as this is and was the default setting.

artwork is kept in individual folders below the Library folder beneath the PMS install dir, and one for each media, as well as subs downloaded by agents, and the rest in the database.

To see the precise folder name, use ExportTools at level 666

As such, to backup everything, backup the entire Library folder, which includes the database, and the qpkg I pointed you towards, will create a share of that

Thanks @dane22, I think this’ll help.

1 Like

Is there a solution now for the lost metadata & progress?
I had the same problem yesterday. I deleted the PMS from my qnap nas and lost everything i adjused. Is there any way i can recover all the data?

If so, data is gone from QNAP sadly, and only way to get it back, is if you have a backup

Thnx for your awnser. I’ve downloaded your tool to vieuw the data so i can make a backup for the future.
I tought all data was stored online in the account. I’ve learned my lesson.
Good that 95% of the data will restore automaticly. Its just the other 5% that takes so damm long.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.