#!/bin/bash

cliShowBackupHelp()
{
    isHeader "LibrePortal Backup Commands"
    echo "backup app create <app_name>"
    echo "    Snapshot an app to all enabled locations."
    echo ""
    echo "backup app schedule <app_name>"
    echo "    Queue a backup task via the WebUI task processor."
    echo ""
    echo "backup app list <app_name>"
    echo "    List backups for an app across all locations."
    echo ""
    echo "backup app delete <app_name> <location_idx>:<snapshot_id>"
    echo "    Delete a single backup from one location."
    echo ""
    echo "backup app delete_all <app_name>"
    echo "    Delete every backup for an app (skips append-only locations)."
    echo ""
    echo "backup all"
    echo "    Snapshot every installed app (also runs 'backup system')."
    echo ""
    echo "backup system"
    echo "    Snapshot the system config (settings, WebUI creds, backup-location"
    echo "    creds) to all enabled locations — needed for a self-sufficient restore."
    echo ""
    echo "backup scheduled"
    echo "    Queue a backup for every app with backups enabled (daily cron entry)."
    echo ""
    echo "backup location add <name> [type]"
    echo "    Add a new backup location. Type defaults to 'local'."
    echo "    Types: local, sftp, rest, s3, b2, gs, azure, rclone"
    echo ""
    echo "backup location remove <idx>"
    echo "    Remove a backup location by index."
    echo ""
    echo "backup location list"
    echo "    Show all configured locations."
    echo ""
    echo "backup location init"
    echo "    Initialize repos for all enabled locations (generates passwords)."
    echo ""
    echo "backup location check [pct]"
    echo "    Run restic integrity check across enabled locations."
    echo ""
    echo "backup location stats [idx]"
    echo "    Show storage statistics for a location (default: 1)."
    echo ""
    echo "backup verify [pct]"
    echo "    Alias for 'backup location check'."
}
