One of the many Scheduled Tasks that a Plex Media Server performs is to make regular backups of the core database, which holds things such as your viewstate information and media matching details.
Related Page: Scheduled Server Maintenance
Finding the Database Backups
The location of the database backups will vary by operating system. Unless you’ve altered the location via the Backup directory advanced setting, you’ll find the backup files in the following locations.
The database backups will be named along the lines of:
com.plexapp.plugins.library.db-2014-04-19 com.plexapp.plugins.library.db-2014-04-22 com.plexapp.plugins.library.db-2014-04-25
On Windows, the backups will be located inside of the user directory.
%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases
Using the Finder’s “Go” menu, select Go To Folder… then enter the following in the dialog box that pops up:
~/Library/Application Support/Plex Media Server/Plug-in Support/Databases/
In general, the location for the various Linux versions of Plex Media Server will be found under:
$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-in Support/Databases/
Restoring a Backup
Once you’ve found the backup file you wish to use:
- Stop/quit your Plex Media Server
- Move the following files out of the directory and store them somewhere for backup, just in case. (You don’t want the “-shm” and “-wal” files to remain in that directory.)
com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal
- Duplicate the database backup file into the correct directory and then rename it to
- Ensure that Plex Media Server has read/write permissions to the restored database file (e.g. in a Linux install, the
plex:plex(user:group) needs access)
- Start your Plex Media Server