Add comprehensive Acronis backup management interface

Implemented complete backup management section with acrocmd integration:

New Features:
- Backup Manager: Centralized interface with organized sections
  • Agent Management (status, logs)
  • Backup Operations (list, trigger, status)
  • Plan Management (view, manage protection plans)
  • Restore Operations (placeholder for future)

Scripts Created:
- acronis-backup-manager.sh: Main backup management menu
- acronis-list-backups.sh: Lists archives and backup details
- acronis-trigger-backup.sh: Triggers manual backups with plan selection
- acronis-backup-status.sh: Shows active tasks and recent activities
- acronis-schedule-viewer.sh: Displays protection plans and schedules
- acronis-plan-manager.sh: Manages protection plans (view/enable/disable/delete)

Integration:
- All scripts use acrocmd CLI for programmatic backup operations
- Updated Acronis menu with streamlined "Manage Backups" option
- Reorganized menu structure for better usability
- Added proper error handling and status checks
This commit is contained in:
cschantz
2025-11-06 16:25:10 -05:00
parent f291a1f0c5
commit b03179cc95
7 changed files with 788 additions and 42 deletions
+103
View File
@@ -0,0 +1,103 @@
#!/bin/bash
################################################################################
# Acronis Backup Manager
################################################################################
# Purpose: Main interface for Acronis backup operations
# Features:
# - List backups and archives
# - Trigger manual backups
# - View backup schedules
# - Monitor backup/recovery status
################################################################################
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
source "$SCRIPT_DIR/lib/common-functions.sh"
source "$SCRIPT_DIR/lib/system-detect.sh"
if [ "$EUID" -ne 0 ]; then
print_error "This script must be run as root"
exit 1
fi
# Check if Acronis is installed
if ! systemctl list-unit-files | grep -q "acronis_mms.service"; then
print_error "Acronis is not installed"
echo ""
echo "Install Acronis first from the Acronis menu."
echo ""
press_enter
exit 1
fi
# Check if acrocmd is available
if [ ! -f "/usr/sbin/acrocmd" ]; then
print_error "acrocmd command-line tool not found"
echo ""
echo "This may indicate an incomplete Acronis installation."
echo ""
press_enter
exit 1
fi
while true; do
clear
print_banner "Backup Management"
echo ""
echo -e "${BOLD}Agent Management${NC}"
echo -e " ${YELLOW}1)${NC} Check Agent Status"
echo -e " ${YELLOW}2)${NC} View Agent Logs"
echo ""
echo -e "${BOLD}Backup Operations${NC}"
echo -e " ${YELLOW}3)${NC} List Backups & Archives"
echo -e " ${YELLOW}4)${NC} Trigger Manual Backup"
echo -e " ${YELLOW}5)${NC} Check Backup Status"
echo ""
echo -e "${BOLD}Plan Management${NC}"
echo -e " ${YELLOW}6)${NC} View Backup Plans/Schedules"
echo -e " ${YELLOW}7)${NC} Manage Protection Plans"
echo ""
echo -e "${BOLD}Restore Operations${NC}"
echo -e " ${YELLOW}8)${NC} Restore from Backup (Future)"
echo ""
echo -e " ${YELLOW}0)${NC} Return to Acronis Menu"
echo ""
echo -n "Select option: "
read -r choice
case "$choice" in
1)
bash "$SCRIPT_DIR/modules/backup/acronis-agent-status.sh"
;;
2)
bash "$SCRIPT_DIR/modules/backup/acronis-logs.sh"
;;
3)
bash "$SCRIPT_DIR/modules/backup/acronis-list-backups.sh"
;;
4)
bash "$SCRIPT_DIR/modules/backup/acronis-trigger-backup.sh"
;;
5)
bash "$SCRIPT_DIR/modules/backup/acronis-backup-status.sh"
;;
6)
bash "$SCRIPT_DIR/modules/backup/acronis-schedule-viewer.sh"
;;
7)
bash "$SCRIPT_DIR/modules/backup/acronis-plan-manager.sh"
;;
8)
bash "$SCRIPT_DIR/modules/backup/acronis-restore.sh"
;;
0)
exit 0
;;
*)
echo ""
print_error "Invalid option"
sleep 1
;;
esac
done