v0.2.6 - Database Reset & Recovery
New Features
Database Management Commands
plexmix db info- Show database statistics, file sizes, and health metricsplexmix db reset- Safely reset database with automatic backup creation
Automatic Recovery System
- Auto-detect missing or empty database files
- Automatically initialize schema when needed
- Prevent migration errors on corrupted databases
Enhancements
Safety Features
- Automatic timestamped backups in
~/.plexmix/backups/ - Interactive confirmation prompts before destructive operations
- Statistics preview showing what will be deleted
- Clear messaging about preserved vs deleted data
Database Resilience
- Handles accidental database deletion gracefully
- Auto-recovery from empty database files
- Corruption detection and safe recreation
Commands
# View database information
plexmix db info
# Reset database (with backup)
plexmix db reset
# Reset without confirmation
plexmix db reset --force
# Reset without backup (not recommended)
plexmix db reset --no-backupWhat Gets Deleted
- SQLite database (
~/.plexmix/plexmix.db) - FAISS embeddings index (
~/.plexmix/embeddings.index) - All synced metadata, tags, playlists, and embeddings
What Gets Preserved
- Your music files on Plex server (unchanged)
- Plex server metadata (unchanged)
- PlexMix configuration (
.env,config.yaml) - API keys
Documentation
- Added Database Management section to README
- Command reference table for all database operations
- Updated feature list to highlight resilience
Files Changed
src/plexmix/cli/main.py- Added db command groupsrc/plexmix/database/recovery.py- New recovery modulesrc/plexmix/database/sqlite_manager.py- Enhanced auto-recoveryREADME.md- Complete database management docspyproject.toml- Version bump to 0.2.6
Testing
All 91 tests passing ✅