Add advanced Plex database recovery and restoration scripts

- Introduced `recover-plex-database.sh` for comprehensive database recovery with multiple strategies, logging, and rollback capabilities.
- Added `restore-plex.sh` for safe restoration of Plex backups, including validation and dry-run options.
- Created `plex-db-manager.sh` to consolidate database management functionalities, including integrity checks and service management.
- Enhanced logging and error handling across all scripts for better user feedback and troubleshooting.
- Implemented safety measures to prevent running scripts as root and ensure proper service management during operations.
This commit is contained in:
Peter Wood
2025-06-21 07:23:33 -04:00
parent 30a252a500
commit 9b83924597
13 changed files with 1410 additions and 300 deletions

View File

@@ -80,7 +80,7 @@ PERFORMANCE_LOG_FILE="${LOCAL_LOG_ROOT}/plex-backup-performance.json"
PLEX_SQLITE="/usr/lib/plexmediaserver/Plex SQLite"
# Script options
AUTO_REPAIR=true # Default to enabled for automatic corruption detection and repair
AUTO_REPAIR=false # CHANGED: Default to disabled to prevent corruption loops
INTEGRITY_CHECK_ONLY=false
INTERACTIVE_MODE=false
PARALLEL_VERIFICATION=true