Skip to content

Arr DB

Overview

Arr DB is a Saltbox module that performs maintenance operations on SQLite databases used by Sonarr, Radarr, Lidarr, Whisparr, Prowlarr and Tautulli instances.


Warning

This role is only for instances that use SQLite databases. If you have migrated your *arr applications to PostgreSQL, do not use this role.

Tasks

The arr_db role performs the following operations for each enabled application:

  1. Integrity Check: Verifies database integrity before proceeding
  2. Backup: Creates a temporary backup of the database files
  3. Vacuum: Reclaims unused space and optimizes the database file
  4. Reindex: Rebuilds database indexes for improved query performance
  5. Cleanup: Removes temporary backup files after successful completion

Configuration

Before running the arr_db role, you must enable at least one application in your Saltbox inventory by setting the appropriate variable to true.

Deployment

Warning

Only run this role when you have enabled at least one application. The databases must already exist for the role to work.

Info

The role automatically stops the application container before database operations and restarts it afterward. If any operation fails, the database is automatically restored from backup.

sb install arr-db

Role Defaults

Use the Inventory to customize variables. (1)

  1. Example override

    arr_db_sonarr_enabled: true
    
arr_db_sonarr_enabled
# Type: bool (true/false)
arr_db_sonarr_enabled: false
arr_db_radarr_enabled
# Type: bool (true/false)
arr_db_radarr_enabled: false
arr_db_lidarr_enabled
# Type: bool (true/false)
arr_db_lidarr_enabled: false
arr_db_whisparr_enabled
# Type: bool (true/false)
arr_db_whisparr_enabled: false
arr_db_prowlarr_enabled
# Type: bool (true/false)
arr_db_prowlarr_enabled: false
arr_db_tautulli_enabled
# Type: bool (true/false)
arr_db_tautulli_enabled: false