#!/bin/bash

cliShowRestoreHelp()
{
    isHeader "LibrePortal Restore Commands"
    echo "restore app start <app_name> [snapshot|latest] [loc_idx]"
    echo "    Restore an app from a backup (default: latest from first-enabled location)."
    echo ""
    echo "restore app list <app_name>"
    echo "    List available backups for an app across all enabled locations."
    echo ""
    echo "restore system [loc_idx]"
    echo "    Restore the latest system-config snapshot into a staging dir"
    echo "    (review-then-copy; never overwrites live config). Default: first location."
    echo ""
    echo "restore migrate discover [loc_idx]"
    echo "    List the source hosts that have backups in a location."
    echo ""
    echo "restore migrate list <source_host> [loc_idx]"
    echo "    List the apps that <source_host> has backed up in a location."
    echo ""
    echo "restore migrate preflight <source_host> <app> [loc_idx]"
    echo "    Probe what a migrate would do (snapshot id, disk, collision,"
    echo "    URL-rewrite decision). Emits a single JSON object — used by the"
    echo "    WebUI before showing the confirm modal."
    echo ""
    echo "restore migrate app <app_name> <source_host> [loc_idx] [opts]"
    echo "    Restore one app's backup taken on another host (cross-host migrate)."
    echo "    Opts: --no-pre-backup  --keep-urls  --json-progress"
    echo ""
    echo "restore migrate system <source_host> [loc_idx] [opts]"
    echo "    Restore every app backed up on a source host. Same opts as above."
    echo ""
    echo "restore first-run discover [loc_idx]"
    echo "    Discover LibrePortal backups in a location (fresh-install flow)."
    echo ""
    echo "restore first-run bulk <loc_idx> <source_host> <app1> [app2 ...]"
    echo "    Bulk-restore multiple apps on a fresh install."
}
