feat: Revamp Plex backup system to streamline archive structure and enhance validation processes

This commit is contained in:
Peter Wood
2025-05-26 07:51:24 -04:00
parent fbd0bf5852
commit 68f7f4ef8e
7 changed files with 390 additions and 162 deletions

View File

@@ -302,7 +302,38 @@ The script includes a comprehensive testing framework (`test-plex-backup.sh`):
## Backup Strategy
The enhanced script implements a robust backup strategy:
The enhanced script implements a robust backup strategy with a streamlined tar.gz-only structure:
### Archive-Only Directory Structure
The new backup system eliminates intermediate dated directories and stores only compressed archives:
```bash
/mnt/share/media/backups/plex/
├── plex-backup-20250125_143022.tar.gz # Latest backup
├── plex-backup-20250124_143011.tar.gz # Previous backup
├── plex-backup-20250123_143008.tar.gz # Older backup
└── logs/
├── backup_log_20250125_143022.md
├── plex-backup-performance.json
└── plex-backup.json
```
### Archive Naming Convention
Backup files follow the pattern: `plex-backup-YYYYMMDD_HHMMSS.tar.gz`
- **YYYYMMDD**: Date of backup (e.g., 20250125)
- **HHMMSS**: Time of backup (e.g., 143022)
- **tar.gz**: Compressed archive format
### Key Improvements
1. **Direct Archive Creation**: No intermediate directories required
2. **Efficient Storage**: Only compressed files stored permanently
3. **Easy Identification**: Timestamp-based naming for sorting
4. **Legacy Cleanup**: Automatic removal of old dated directories
5. **Archive Validation**: Integrity checking of compressed files
### 3-2-1 Backup Rule