Where is the Database Location?
When managing a Plex server, it is important to where the Plex database location is on your server. A big reason why you should know is that it can help with backing up the database when needed. A second reason is that knowing the location will help repair a corrupt database.
Plex does provide a mechanism for backing up the database. Sometimes you may want to either use your own scheduler, or manually back it up on demand. The next section will explain where you can find the Plex database.
The Plex database location
The Plex database location isn't hard to locate as you can find it in the same folder as the other Plex data files. The one thing you will notice, though, is that there are at least three databases managed by Plex.
To find the Plex database, navigate to the Plex data directory on your server. Within this folder, you will then navigate to the following location:
{plex_data_directory}/Plug-in Support/Databases
Within the above folder you will find several files. The Plex databases have the extension .db. The additional files are used by the database - they will have similar names, just additional characters in their extensions.
The Plex database is a SQLite database. This is a common, and easy to use database. While you can find applications to open the database, I highly recommend you don't change the database or data. Doing so can corrupt the database and your Plex server.
Backing up the Plex database
As I mentioned earlier, one of the reasons for knowing the location of the Plex database is so you can back up the database files. If you wish to do so manually, or through an application, you can just copy the files in the database directory.
The way that Plex reads the database, doesn't lock the database files. This makes it easy to copy the database files to a different location.
Backing up the Plex database using Plex
Of course, the easiest way to backup the Plex database is to use the scheduled tasks option within Plex. To have Plex backup the database every three days, you can do the following:
- Open a Web browser and navigate to your Plex server.
- Log into your Plex server as an administrator.
- Click the Settings - the wrench - link in the upper-right corner of the Plex server page.
- From the menu on the left, scroll down to the Settings section and click the Scheduled Tasks option.
- Click the Show Advanced button to display a text field that will allow you to specify the backup location.
- Check the Backup database every three days checkbox.
- Enter a path in the Backup directory field.
- Click the Save Changes button.
Plex will now backup your Plex database every three days. If you would like to schedule it more often, you can just backup the files yourself using a scheduler you prefer.