bfbddf363a
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 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
77 lines
2.8 KiB
Bash
Executable File
77 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
################################################################################
|
|
# Acronis List Backups
|
|
################################################################################
|
|
# Purpose: List all backups and archives using acrocmd
|
|
# Features:
|
|
# - Show backup archives
|
|
# - Show backup versions
|
|
# - Display backup details (size, date, location)
|
|
################################################################################
|
|
|
|
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
|
|
|
|
clear
|
|
print_banner "List Backups & Archives"
|
|
|
|
echo ""
|
|
echo -e "${BOLD}Retrieving backup information...${NC}"
|
|
echo ""
|
|
|
|
# Check if acrocmd is available
|
|
if [ ! -f "/usr/sbin/acrocmd" ]; then
|
|
print_error "acrocmd command-line tool not found"
|
|
echo ""
|
|
press_enter
|
|
exit 1
|
|
fi
|
|
|
|
# List archives
|
|
echo -e "${CYAN}════════════════════════════════════════════════════════════${NC}"
|
|
echo -e "${BOLD}Backup Archives${NC}"
|
|
echo -e "${CYAN}════════════════════════════════════════════════════════════${NC}"
|
|
echo ""
|
|
|
|
if /usr/sbin/acrocmd list archives 2>/dev/null | grep -q .; then
|
|
/usr/sbin/acrocmd list archives 2>/dev/null
|
|
else
|
|
echo -e "${YELLOW}No backup archives found${NC}"
|
|
echo ""
|
|
echo "Possible reasons:"
|
|
echo " • No backups have been created yet"
|
|
echo " • Agent not registered with Acronis Cloud"
|
|
echo " • No backup plans configured"
|
|
fi
|
|
|
|
echo ""
|
|
echo -e "${CYAN}════════════════════════════════════════════════════════════${NC}"
|
|
echo -e "${BOLD}Backup Details${NC}"
|
|
echo -e "${CYAN}════════════════════════════════════════════════════════════${NC}"
|
|
echo ""
|
|
|
|
if /usr/sbin/acrocmd list backups 2>/dev/null | grep -q .; then
|
|
/usr/sbin/acrocmd list backups 2>/dev/null
|
|
else
|
|
echo -e "${YELLOW}No backup details available${NC}"
|
|
fi
|
|
|
|
echo ""
|
|
echo -e "${CYAN}════════════════════════════════════════════════════════════${NC}"
|
|
echo ""
|
|
echo -e "${BOLD}Options:${NC}"
|
|
echo ""
|
|
echo " • Create backups via 'Trigger Manual Backup'"
|
|
echo " • Configure plans in Acronis web console"
|
|
echo " • Check backup status for active operations"
|
|
echo ""
|
|
|
|
press_enter
|