Improve Acronis backup trigger plan detection
- Add detection for when no CLI-managed plans exist - Clarify that cloud-managed plans (web console) aren't visible via acrocmd - Explain distinction between CLI-managed vs cloud-managed plans - Provide guidance for both web console and CLI plan management - Note that API credentials would be needed for cloud plan access
This commit is contained in:
@@ -40,23 +40,33 @@ echo ""
|
|||||||
|
|
||||||
plan_output=$(/usr/sbin/acrocmd list plans 2>&1)
|
plan_output=$(/usr/sbin/acrocmd list plans 2>&1)
|
||||||
|
|
||||||
if echo "$plan_output" | grep -qi "error\|failed\|no plans"; then
|
# Check if no plans exist (empty output or success message only)
|
||||||
|
if echo "$plan_output" | grep -qi "error\|failed\|no plans" || ! echo "$plan_output" | grep -q "[a-f0-9]\{8\}-[a-f0-9]\{4\}"; then
|
||||||
echo -e "${YELLOW}No backup plans found or error querying plans${NC}"
|
echo -e "${YELLOW}No backup plans found or error querying plans${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Possible reasons:"
|
echo "Possible reasons:"
|
||||||
echo " • No backup plans configured yet"
|
echo " • No CLI-managed plans exist (acrocmd only shows local plans)"
|
||||||
|
echo " • Cloud-managed plans created in web console are not visible here"
|
||||||
echo " • Agent not registered with Acronis Cloud"
|
echo " • Agent not registered with Acronis Cloud"
|
||||||
echo " • Need to configure plans in web console first"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
|
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}To Configure Backup Plans:${NC}"
|
echo -e "${BOLD}Important Note:${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Plans created in the Acronis web console are managed at the cloud level"
|
||||||
|
echo "and are NOT accessible via the acrocmd CLI tool. The CLI can only see and"
|
||||||
|
echo "manage plans created locally via acrocmd commands."
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}To Trigger Cloud-Managed Backups:${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "1. Log in to Acronis web console"
|
echo "1. Log in to Acronis web console"
|
||||||
echo "2. Navigate to: Devices → Select this server"
|
echo "2. Navigate to: Devices → Select this server"
|
||||||
echo "3. Click 'Add protection plan'"
|
echo "3. Click 'Back up now' to trigger your existing plan"
|
||||||
echo "4. Configure backup settings and schedule"
|
echo ""
|
||||||
echo "5. Return here to trigger backups"
|
echo -e "${BOLD}To Create CLI-Managed Plans:${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Use: acrocmd create plan --help"
|
||||||
|
echo "Note: CLI plans give you more control and optimization options"
|
||||||
echo ""
|
echo ""
|
||||||
press_enter
|
press_enter
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user