Skip to content

Plex DB

Overview

Plex DB is a Saltbox module that performs maintenance operations on SQLite databases used by Plex Media Server instances.


Tasks

For each of your defined plex instances:

  1. Checks if the main database passes integrity_check
  2. Checks if the blobs database passes integrity_check
  3. Backs up databases
  4. does a sqlite 'VACUUM' operation on the main database
  5. does a sqlite 'VACUUM' operation on the blobs database
  6. does a sqlite 'REINDEX' operation on the main database
  7. does a sqlite 'REINDEX' operation on the blobs database

If any of those operations fail, the backup databases are restored.

The plex containers are stopped for the duration of this process.

Further information:

Deployment

sb install plex-db

Role Defaults

Use the Inventory to customize variables. (1)

  1. Example override

    plex_db_integrity_check_only: true
    
plex_db_integrity_check_only
# Type: bool (true/false)
plex_db_integrity_check_only: false
plex_db_failed_integrity
# Type: bool (true/false)
plex_db_failed_integrity: false
plex_db_failed_optimization
# Type: bool (true/false)
plex_db_failed_optimization: false