Diagnosing what data we lose especially when a server's hard disk becomes corrupted or server stopped working by any reason.
Server Stream Log Analyzer
Overview
This script provides a comprehensive solution for tracking and analyzing media server stream logs, specifically designed to assist with data recovery when server failures occur. The tool connects directly to your database to retrieve detailed logs of all movies and series associated with a specified server ID.
Key Features
Database Connectivity
Establishes secure connection to your media server database
Retrieves stream logs for specified server IDs
Handles both movie and series content types separately
Log Analysis Capabilities
Categorizes logs by content type (movies vs series)
Provides detailed counts of each media type
Generates comprehensive reports of all streamed files
Data Recovery Assistance
Identifies exactly which files were stored on failed servers
Creates recoverable logs of lost media assets
Helps plan server reconfiguration by documenting previous content
Usage Scenarios
Server Failure Recovery
When a server's hard disk becomes corrupted or the server stops functioning:
Run the script with the affected server's ID
Generate a complete log of all media files that were stored on that server
Use the log to identify missing content for restoration
Maintenance Planning
Document server contents before hardware upgrades
Track media distribution across multiple servers
Maintain historical records of server configurations
Technical Implementation
The script:
Accepts server ID as input parameter
Queries the database for all associated stream logs
Processes results to categorize by media type
Generates counts and detailed listings
Outputs formatted reports suitable for recovery operations
Benefits
Time-saving: Quickly identifies lost content rather than manual searching
Comprehensive: Captures all media files in a structured format
Diagnostic: Helps analyze patterns that may predict server issues
Planning: Provides data for better server configuration decisions
This tool is essential for media server administrators who need to maintain reliable records of distributed content and prepare for potential hardware failures.