cloudstack/scripts/vm/hypervisor
James Peru fbb916b254 feat(backup): nasbackup.sh full+incremental modes via backup-begin
Adds three new optional CLI flags to nasbackup.sh:
  -M|--mode <full|incremental>
  --bitmap-new <name>          (checkpoint to create with this backup)
  --bitmap-parent <name>       (incremental: parent bitmap to read changes since)
  --parent-path <path>         (incremental: parent backup file for rebase)

Behavior:
  - When -M is omitted, behavior is unchanged (legacy full-only, no checkpoint
    created), so existing callers are not affected.
  - With -M full + --bitmap-new, a full backup is taken AND a libvirt
    checkpoint of that name is registered atomically (via backup-begin's
    --checkpointxml), giving the next incremental its starting bitmap.
  - With -M incremental, libvirt's <incremental> element references the
    parent bitmap; only changed blocks are written. After completion,
    qemu-img rebase wires the new file to its parent so the chain on the
    NAS is self-describing for restore.
  - Stopped VMs cannot use backup-begin; if -M incremental is requested
    while VM is stopped, the script falls back to a full and emits
    INCREMENTAL_FALLBACK= on stderr so the orchestrator can record it
    correctly in the chain.
  - The script echoes BITMAP_CREATED=<name> on success so the Java caller
    can store it under backup_details (NASBackupChainKeys.BITMAP_NAME).

Works across local file, NFS-file, and LINSTOR primary storage. Ceph RBD
running-VM support is a pre-existing limitation of this script, not
affected by this change.

Refs: apache/cloudstack#12899
2026-04-27 18:53:20 +03:00
..
external/provisioner extension: improve host vm power reporting (#11619) 2026-01-30 14:07:22 +05:30
kvm feat(backup): nasbackup.sh full+incremental modes via backup-begin 2026-04-27 18:53:20 +03:00
ovm3 removed code in comments (#11145) 2025-12-08 16:31:48 +01:00
vmware Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
xenserver Add support for vTPM for XenServer and XCP-ng 8.3/8.4 (#12263) 2026-01-28 13:12:32 +02:00
update_host_passwd.sh Fixes script that perform change password on hosts (#6783) 2022-12-16 17:21:44 +01:00
versions.sh interpret /etc/redhet-release better (#7570) 2023-06-09 10:29:42 +02:00