DSM 7 Migration after Synology server crash

Server Version#: DSM 7
Plex Version#: 1.32.5

So, I’ve got a mess on my hands after my Synology server crashed due to several power failures and the UPS just not having enough juice left in between reboots. This forced me to re-install DSM.

At the time of the crash I was on DSM 6.2 and running Plex Media Server. During the Synology recovery process the old DSM 6.2 was removed and DSM 7 was installed. All automated using Synology’s reset button.

After the new DSM 7 was installed I tried to do the Plex migration but ran into an issue of the OS being a fresh install it didn’t seem to think the old Plex was there and just installed a fresh copy of Plex Media Server I downloaded from the Plex website. I should note (and this is where I think I made a mistake) when the option to do a normal install or use a Plex Token, I chose Plex token as it implied it was for a “New or lost servers only”.

The install worked but did not migrate my previous Plex (DSM6) libraries over. So I decided to uninstall and try again, this time using the Normal installation route. Now, when I click “Done” to confirm the Plex Configuration settings and initiate the install I get an error message “System Error. Unable to perform this operation. Please try again later”. The installation fails. In Package Center I still see Plex saying it’s installing. But I don’t think it really is as there seems to be no real cpu load happening. No files are generated in the new PlexMediaServer directory.

At this point in order to abort the install I have to restart the server, which does tell me there is a process still running “(Un)installing Packages”. Which again I believe is the failed Plex install. Once I’ve rebooted I can go back to Package Center, click on Plex which says “error” and uninstall the package.

So at this point in time I’m unable to install Plex at all. After reading several other messages on this forum I should note I did not create the PlexMediaServer folder, it did it for me. I did give the old Plex folder full control (admin, read and write) with user PlexMediaServer and checked the apply to all box. It took awhile to update all the file permissions as there are over 400,000+ files and over 500GB of data in the old Plex folder. Additionally, I just noticed that a Migration.log file was created but it’s only entry is a date/time stamp followed by Start: Change Ownership.

I think I covered everything I’ve done. Any help would be appreciated.

Do you still have the old Plex Data Folder, including the database files?
Folder: /Plex/Library/Application Support/Plex Media Server/
The database files are in Plug-in Support/Databases.

Is there a tmp folder inside Application Support?
If so, how large is it?


It appears the migration to the new file structure (/PlexMediaServer) failed. If it had succeeded, the `/Plex` folder would be empty except for the migration log. The installer would have moved everything to the new `/PlexMediaServer` folder.

Thank you for getting back to me.

Last night around midnight I finally gave up and walked away after another attempt and received the same error message “System Error. Unable to perform this operation”. But when I woke up this morning Plex was completely installed and the migration had run. Everything looks perfect.
I guess all those times I received that error message I should have been patient as it was really running in the background.

Thank you again for getting back to me. You can close this ticket.

One think I would like to note. Plex is lightning fast now. I didn’t realize how slow and sluggish it was getting when browsing through all my content.
Is there a way to periodically rebuild the database, say maybe once a year?

@prehistoric007

You don’t need to rebuild your database.

You can optimize / clean it in a way PMS can’t (because it’s running)

You can run this in a Task Scheduler task (as ‘root’ user)
– I show examples in the README

Thank you!

I browsed through the instruction. Looks like it’s very easy to use.

@ChuckPa Am I correct in understating Synology supports passing arguments within Task Scheduler?

@prehistoric007

When you create a Scheduled Task - User Script.

You are given the full command line access

What you’re writing is the equivalent of a cron script.
One script can call another script (my tool) and pass arguments – just like it’s shown/

Thanks for the clarification as well as creating the tool for the Plex community.

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