That could work.
Was Plex Media Server stopped when you took the image backup?
PMS needs to be stopped so the database files are closed when the backup is taken. If PMS was running, and the db files open, there is a good chance the files will not work. You can always try them and see what happens.
If the backup includes the db backups make by Plex, the ones with yyyy-mm-dd appended, then you could use those files. Plex Media Server closes the database before making those backups, so they should be valid.
The files to restore are com.plexapp.plugins.library.db
and com.plexapp.plugins.library.blobs.db
.
The location of the database files is %LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases
. On Windows systems, %LOCALAPPDATA% is usually C:\Users\your_user_name\AppData\Local
.
The error message is from Plex Media Server.log
. Any SQLITE error message indicates a problem with the database. INFO and WARN messages are OK.
If you use the months old backup, Plex will have to migrate the database to match the current schema. This may take some time - minutes, tens of minutes, hours - depending on the size of your db. Plex will be unresponsive while this happens. You may see a 503 error in the web browser saying Plex is performing maintenance. Do not interrupt the process. Let it complete. Otherwise a) it may corrupt the database, and b) it will start over from the beginning when resumed. Reference: The db on my server is 88.5 MB and it migrated in under two minutes. This is on a Synology NAS with a Celeron CPU. Others, with much larger databases, also on Celeron based systems, reported the migration took 2+ hours.
Process:
-
Run Plex Media Server using current db.
In Settings → Library, deselect Empty trash automatically after every scan
and save changes. Will re-enable later.
-
Stop Plex Media Server
-
Make a backup copy of the current Databases folder, then delete all the files in the Databases folder.
-
Copy the desired backups to the Databases folder: com.plexapp.plugins.library.db
and com.plexapp.plugins.library.blobs.db
. If you use the backups made by Plex, remove -yyyy-mm-dd
from the file names.
-
Start Plex Media Server.
Wait for Plex to update the database.
-
See if Plex works OK - scan libraries, refresh metadata, play some media, etc.
-
Pull the log files, look in Plex Media Server.log
(or .1.log
to .5.log
) for any SQLITE errors.
If necessary, repeat steps 4 - 7 using other backups, etc. until you find one that works.
Once Plex Media Server is running and stable (see pic below):
- Scan all Libraries
- Empty Trash
- Clean Bundles ← also in Settings → Troubleshooting
- Optimize the Database ← also in Settings → Troubleshooting
Restore any Plex Media Server settings, such as Empty Trash automatically
.
In Settings → Scheduled Tasks, make sure Backup database every three days
is selected.
