Repair VM backups with the backups CLI
VKB-1094How-to
- 📦 Applies to
- Xen Orchestra
- 🗓️ Created
- 2024-03-14
- 🔄 Updated
- 2026-08-12
- 🏷️ Tags
Environment
A machine that can reach the backup remote, with npm available. See the upstream documentation for the full option list.
Procedure
-
Install the npm package:
# npm install --global @xen-orchestra/backups-cli
-
Run it against the VM backup directories. Without a flag it only reports what it finds, which is the right first pass:
# xo-backups clean-vms xo-vm-backups/*
-
Once the report looks right, act on it:
# xo-backups clean-vms --merge --remove xo-vm-backups/*
--mergecontinues merging VHD files that are unused.--removedeletes files that are unused, incomplete, orphaned or corrupted.
Verification
Re-run the command with no flags. A clean run reports nothing to do. Run a backup job afterwards to confirm the chain is usable.
Run the reporting pass first every time. --remove deletes backup data, and
the report is what tells you whether that is what you want.
Was this page helpful?