#!/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 "Create Manual Backup"

echo ""
echo -e "${BOLD}Manual Backup Creation${NC}"
echo ""
echo "Manual backups are triggered through the Acronis web console or CLI."
echo ""
echo -e "${CYAN}Web Console Method (Recommended):${NC}"
echo ""
echo "1. Log in to Acronis web console"
echo "2. Go to: Devices → Select this server"
echo "3. Click 'Back up now' button"
echo "4. Monitor backup progress in real-time"
echo ""
echo -e "${CYAN}Command Line Method:${NC}"
echo ""
echo "Use the Acronis CLI tool (acrocmd):"
echo ""
echo "  # List available plans"
echo "  acrocmd list plans"
echo ""
echo "  # Run backup for specific plan"
echo "  acrocmd backup run --plan <plan_id>"
echo ""
echo "  # Create ad-hoc backup"
echo "  acrocmd backup create --source /path/to/data --destination /backup/path"
echo ""
echo -e "${BOLD}Note:${NC} Detailed CLI backup functionality can be added here based on"
echo "your specific requirements. Would you like me to implement the full"
echo "CLI backup interface?"
echo ""
press_enter
