My music library, which is over 2TB and over 500,000 files, exists on a separate external drive. Whenever I try to get Plex to set up a library for it, Plex starts OK but eventually just stops indexing, with the library incomplete. I have noticed that any attempt to optimize the library yields a message that the database is corrupt.
If Plex ever is shut down, it will no longer re-start because of the corrupt database and I am forced to uninstall Plex, manually delete the local data files on my computer, and re-install. At this point, I've given up even trying to set up my music library because the time it takes to attempt installation (which ultimately fails) and then have to remove and uninstall and re-install is too much. Please advise because, as much as I love using Plex for my video collection, I want to use it for my music collection as well.
I am running a PC with Windows 7 64-bit, Intel quad core processors, and 16GB of RAM.
When creating a library Plex needs to scan all items in it in 1 shot. 500,000 songs is just too much to do in 1 shot. You'll need to break this up and scan maybe 100,000 (or even less) at a time.
Is there a way to create a backup of Plex before attempting this? I'd like to have something I can restore in case even splitting up the scanning proves to be too much.
I use the following script to backup the data area - adapted from someone else’s posting in the forums
I use cjmurph’s PMS As A Service to run Plex Media Server - so there are references to that service. I do not restart the service at the end because i follow this weekly script with a reboot and that would restart the service
Rem
set myRARAreaDrive=C:
set myRARArea=%LocalAppData%\Plex-Backups
set myPlexLocalPath=C:\Users\Plex\AppData\Local\Plex Media Server
if not exist "%LocalAppData%\Plex-Backups" mkdir "%LocalAppData%\Plex-Backups"
echo %date%,%time% - Creating LastBackup folder if it does not exist
if not exist "%LocalAppData%\Plex-Backups\Lastbackup" mkdir "%LocalAppData%\Plex-Backups\Lastbackup"
%myRARAreaDrive%
cd %LocalAppData%\Plex-Backups
Rem
Rem
rem backup last backup RAR file first (keep one older version)
echo %date%,%time% - Moving last backup files
move /Y *.rar %myRARArea%\Lastbackup\
move /Y *.log %myRARArea%\Lastbackup\
Rem
echo %date%,%time% - Stopping PlexService Service
%windir%\system32
net stop PlexService
echo %date%,%time% - Force Terminate Plex processes
%windir%\system32 askkill /im "Plex Media Scanner.exe" /t /f > nul
%windir%\system32 askkill /im PlexScriptHost.exe /t /f > nul
%windir%\system32 askkill /im PlexDlnaServer.exe /t /f > nul
%windir%\system32 askkill /im "Plex Media Server.exe" /t /f > nul
echo %date%,%time% - Running WinRar for All Data in %MyPlexLocalPath%
"C:\Program Files\WinRAR\rar.exe" a -r -y -dh -v1000000 -inul -logf=rarList.log PlexLocalData.rar "%MyPlexLocalPath%\*.*"
Rem Not restarting Service - reboot will do it. %windir%\system32
net start PlexService
echo %date%,%time% - Exiting
Rem
Should really also add kill for PlexNewTranscoder.exe and PlexTranscoder.exe processes as well
Ought to add export of registry but have not done it because I run this in admin account which is different from the Plex Media Server windows account and I need to find out the Account SID in the registry before I can back it up. Would be easier probably just to backup the whole HKEY_USERS set