#!/bin/bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
source "$SCRIPT_DIR/lib/common-functions.sh"

if [ "$EUID" -ne 0 ]; then
    print_error "This script must be run as root"
    exit 1
fi

print_banner "Configure Backup Plans"

echo ""
echo -e "${BOLD}Acronis Backup Plan Configuration${NC}"
echo ""
echo "Backup plans are configured through the Acronis web console."
echo ""
echo -e "${CYAN}Steps to configure backup plans:${NC}"
echo ""
echo "1. Log in to your Acronis web console"
echo "   → https://us5-cloud.acronis.com (or your region)"
echo ""
echo "2. Navigate to: Devices → All devices"
echo ""
echo "3. Find this server in the device list"
echo ""
echo "4. Click on the device and select 'Protection'"
echo ""
echo "5. Click 'Add plan' and configure:"
echo "   • Backup source (files, folders, system)"
echo "   • Backup schedule (hourly, daily, weekly)"
echo "   • Retention policy (how long to keep backups)"
echo "   • Backup location (cloud or local)"
echo ""
echo "6. Apply the plan to this device"
echo ""
echo -e "${BOLD}Common Backup Plans:${NC}"
echo ""
echo "  • Full Server Backup"
echo "    → Entire system image for disaster recovery"
echo ""
echo "  • cPanel Accounts"
echo "    → /home/* directories for user data"
echo ""
echo "  • Databases"
echo "    → MySQL/MariaDB databases with consistent snapshots"
echo ""
echo "  • Configuration Files"
echo "    → /etc and other critical configs"
echo ""
echo "  • Web Files"
echo "    → /home/*/public_html websites"
echo ""
press_enter
