Add comprehensive Acronis backup troubleshooting tool

Created acronis-troubleshoot.sh with intelligent diagnostic capabilities:

7-Point Diagnostic System:
1. Service Health Check
   - Verifies all 4 Acronis services (aakore, mms, schedule, active-protection)
   - Detects stopped/failed services
   - Auto-generates restart recommendations

2. Disk Space Analysis
   - Checks /var/lib/Acronis and root filesystem
   - Warns at 90%, critical at 95% usage
   - Identifies insufficient space for backups

3. Memory Monitoring
   - Tracks system memory usage
   - Warns at high memory conditions (>90%)
   - Detects potential memory leaks

4. Network Connectivity Testing
   - Tests connection to Acronis Cloud URL
   - DNS resolution verification
   - Identifies firewall/network issues

5. Multi-Location Log Scanning
   - Scans multiple log locations:
     * /var/lib/Acronis/BackupAndRecovery/MMS/mms.*.log
     * /var/log/acronis/agent/*.log
     * System logs (/var/log/messages, /var/log/syslog)
   - Pattern detection for 8 common failure types:
     * Insufficient space errors
     * Permission denied
     * Connection failures
     * Authentication failures
     * Backup task failures
     * VSS/snapshot errors
     * Database errors
     * File locking issues

6. Stuck Process Detection
   - Identifies long-running Acronis processes
   - Detects hung backup jobs
   - Recommends service restarts when needed

7. Configuration Verification
   - Checks backup plan configuration
   - Verifies agent version
   - Registration status validation

Intelligent Recommendations:
- Context-aware fix suggestions based on detected issues
- Prioritized action items (critical vs warnings)
- Specific commands to resolve each issue type

Quick Actions Menu:
1. View all errors from logs
2. Restart all services
3. Generate detailed diagnostic report for support
4. Export logs as tar.gz archive

Issue Tracking:
- Categorizes findings as CRITICAL or WARNINGS
- Provides comprehensive summary with counts
- Color-coded output (red=critical, yellow=warning, green=ok)

Added to Acronis menu as option 12 (Troubleshooting section)

This tool enables rapid diagnosis of backup failures without needing
to manually dig through logs or check multiple system components.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cschantz
2025-11-05 21:36:13 -05:00
parent 8fbfc73991
commit aa6a2ac2df
2 changed files with 476 additions and 0 deletions
+5
View File
@@ -600,6 +600,10 @@ show_acronis_menu() {
echo -e " ${YELLOW}10)${NC} View Logs - Check Acronis logs"
echo -e " ${YELLOW}11)${NC} Uninstall Acronis - Remove Acronis agent"
echo ""
echo -e "${BOLD}Troubleshooting:${NC}"
echo ""
echo -e " ${RED}12)${NC} 🔧 Troubleshoot Backups - Diagnose backup failures"
echo ""
echo -e " ${RED}0)${NC} Back to Backup & Recovery"
echo ""
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
@@ -624,6 +628,7 @@ handle_acronis_menu() {
9) run_module "backup" "acronis-update.sh" ;;
10) run_module "backup" "acronis-logs.sh" ;;
11) run_module "backup" "acronis-uninstall.sh" ;;
12) run_module "backup" "acronis-troubleshoot.sh" ;;
0) return ;;
*) echo -e "${RED}Invalid option${NC}"; sleep 1 ;;
esac