NAKIVO Never Documented Their API: How I Automated a Whole BDR Stack Anyway
A field story from a Proxmox backup tower, a Synology NAS mid-RAID-rebuild, and an undocumented JSON-RPC API with 117 action groups: five failure rungs to get one backup running, a repository that refused to exist, three silent failures at 0%, and a VM that booted straight off the backup in about 40 seconds. Every VM in the stack now boots off its own backup, and there are console photos. The permanence question is settled with checksums: the recovered VM can be kept for good, with zero data loss. Triggering a real full backup through the API took one more mined secret: two fields, and the second is the difference between a full and a silent incremental. An automated pass now full-backups and boot-proves the whole estate on a schedule, with console photos as evidence. If you want the payoff without the story, jump straight to the recovery playbook: every option ranked, what you can't do, the commands, and the pitfalls.
The setup
I build backup and recovery (BDR) stacks for clients. The current project: a Proxmox tower, a Synology NAS as the backup repository over a private link, and NAKIVO Backup & Replication as the software that ties it together. NAKIVO has a web UI called the Director. In hypervisor terms, the Director is the vCenter: it holds the job configs, the schedule, the catalog of backups. It moves no backup data itself. The transporter (their worker process) does the actual disk I/O wherever data flows.
Here's my constraint, and it's the reason for everything in this article: I run a headless AI assistant that operates my infrastructure. It can SSH into anything, it can run scripts on a schedule, it can watch counters and alert me. What it cannot do is click through a web wizard at 2 AM. So for me, "we'll just do it in the GUI" is not a plan. A GUI action is a step that can't be scheduled, can't be monitored, can't heal itself, and can't be reused on the next client site. The API was the whole project. The GUI was just where the errors went to hide.
That line is the thesis of this story: the GUI teaches you what the product does. The API is where you find out what it actually accepts.
NAKIVO does document an API, in the sense that there's a page somewhere describing a REST-ish interface for a few operations. What they do not document is the interface their own web UI uses, which is a different thing entirely and covers everything. This article is about that one.
First: finding the API nobody documents
The first hint came from watching the network tab while clicking around the Director UI. Every click fired a POST to the same endpoint: https://<director>:4443/c/router. Not REST paths. Not /api/v1/jobs. One endpoint, and the payload tells the server what you want:
{"action": "JobManagement", "method": "run",
"data": [{"jobIds": [1], "runType": "ALL"}],
"type": "rpc", "tid": 42}That's Ext.Direct, a JSON-RPC dialect that Sencha (Ext JS) applications speak. The web UI is a Sencha app. Which means everything the UI can do, that endpoint can do, if you can figure out the shapes. And there's a cheat sheet sitting in the open:
GET https://<director>:4443/c/api
That returns the full descriptor: every action group, every method, and how many positional arguments each one takes. On this build: 117 action groups. Two things to know about the descriptor. One, it's JSONP-style, so the response starts with Ext.app.REMOTING_API={...} and you strip that wrapper before parsing. Two, it shifts between releases, so re-pull it on every version bump. The method names and argument counts are the authoritative list for the version you're running.
Login is the obvious first call, and it's where you learn the API's personality: AuthenticationManagement.login([user, password, remember]), positional arguments, sets a session cookie you carry on every call. One account for automation, credentials staged in a file with 0600 permissions. Repeated bad passwords increment a failedAttempts counter toward lockout, so never guess: if you don't know a shape, don't brute force it, go read something else.
The login response includes a field called productConfigured. First time in, it was false. That does not mean your account is broken. It means the first-run setup wizard hasn't finished: no inventory added, no repository created, no backup configured yet. The UI locks most of its menus even for a full administrator until that's true. Fix it through the API (add inventory, create a repo, run one backup) and the flag flips. Nothing to reinstall, no license to blame. That one cost me an evening of staring at a UI that had locked me out of itself.
Talking to it: the basics that still cost three rounds
A few traps are structural and worth naming before the war stories, because they explain half the pain.
Responses live under data, never result. Every successful call returns {"result": null, "data": {...}}. If you check resp["result"] like a normal JSON-RPC client, every healthy call looks like a failure. I burned three rounds re-probing argument shapes that were already correct because I was reading the wrong key. On first contact with any method: dump the whole response raw and look at the keys before you write a single assertion.
Arguments are positional arrays, and the count matters. The descriptor tells you each method's argument count. run takes one argument: an object with jobIds inside it. A bare [1] gets rejected. getJobShortInfo takes one argument that must itself be a list, so a bare id returns null. listVirtualMachines takes one argument that is an array of vid strings, so the data field double-wraps: [["PROXMOX_HOST-1"]]. There's no rule you can memorize. There's only: read the descriptor, count the positions, try the shape, and when it fails, go read the real error (more on where errors actually live in a minute).
The error strings are a decoder ring. Three patterns cover most rejections:
empty value in Xmeans field X is missing or unmapped. Add exactly that key.The parameter value is invalidmeans the top-level shape is wrong (arity, or a wrapper where an array belongs, or vice versa).- A NullPointerException naming a getter, like
JobOptions.getGenerateMac() is null, is the server politely telling you the exact DTO field you forgot to fill.
That last one becomes the hero of the final chapter.
The first backup job: five failure rungs, in order
Goal one was a real backup job through the API: a Windows 11 laptop, physical machine, agent-based backup into a repository on the tower. NAKIVO's own UI builds this in a five-screen wizard. Through the API it took five failure rungs, each one costing a cycle, in this order:
Rung 1: the destination that doesn't exist. The repository list returns vid: null for every repository (a quirk of the listings call), so there's no ID to point the job at. The identifier the runtime actually wants is the string BACKUP_REPOSITORY-<id>, concatenated by hand. I found the format by mining their own code: a SQL fragment that reads targetStorageVid = concat('BACKUP_REPOSITORY-', br.id). Omit the destination and the run dies in seconds with SelectTargetBackupRepository: Cannot find the "null" item. Which is a genuinely great error message, by NAKIVO standards. Enjoy it, it's the last friendly one.
Rung 2: the source that isn't a source. The discovery process (you feed the Director your Proxmox or Windows host credentials, it scans and lists machines) produces items with their own IDs. The job editor happily accepts a discovery-item ID as the job's source. At runtime the run dies instantly: PhysicalDiscoveryItem cannot be cast to SourceItem. And here's the part that turns an error into an ordeal: after that cast failure, the Director silently retries every 15 minutes while the job status stays RUNNING. It looks alive. Zero bytes move. The correct source is the machine's inventory ID (PM-<id>), which you get off the discovery item's targetVid field.
Rung 3: mappings. A backup job needs a per-disk mapping list: which physical disks of the machine go into the backup. The API lets you save a job with an empty mappings array. The run then dies in pre-flight with no disk mappings to process. The disk list comes from an inventory call that returns extendedInfo.disks[], one entry per disk, and you build one mapping per disk.
Rung 4: the enabled flag. The save envelope has an outer enabled field. Save without it and the job reads back enabled: null, which is to say disabled. Every subsequent run call then sits in WAITING_DEMAND doing absolutely nothing, with no error, because a disabled job isn't an error, it's a choice you didn't know you made. After every save: read back the flag, fix it, call enable.
Rung 5: the edit lock. Try to save a job while it's running and you get This job is locked by the run action. Order matters: stop, wait a few seconds, save, run again.
When the laptop's first full finally ran clean, it wrote 292.9 GB into the repository (356 GB used on the source, FAST compression doing its job). And then the job reported FAILED. With one object OK and one object failed. The failed object was a zombie: a stale leftover object from an earlier edit, still attached to the job, that can never succeed. It burned its retry ladder (15, 30, 45 minutes) and stamped the run FAILED at the same timestamp the real machine's "processing has finished" event landed. Two events, same moment: one says finished, one says failed. Both messages at once. Very helpful.
The heal is API-clean: mark the stale object with nextRunAction: "DELETE_KEEP_TARGET" (an enum I mined out of their JAR, one of four variants, this one keeps the backup data and only unlinks the job object), save, run. Object count went 2 to 1, verified by read-back, and the re-run finished clean. The standing lesson, learned the hard way: never report DONE or FAILED from the job-level flag alone. Check the per-object results, then count the real objects, then look at the disk. The disk doesn't do politics.
That's the general truth-meter problem with this whole API, and it deserves its own paragraph. The API's progress field is per-thousand of the current step, not the job: I watched it climb past 1661 (that's 166%) mid-run and later saw it go backwards, 6771 to 5036, with no run change in between. There are no byte-level run stats in the API responses. The only honest number I had at that point was file growth in the repository directory itself: a du delta on the repo host. (The Director's own logs turn out to write true transfer totals per run; that discovery, and what it settles, comes later in the story.) Wire meter says one thing, the Director says another, and the disk says the truth. The disk always says the truth.
One more field anecdote because it's the kind of thing that only shows up in the field: stop a first full mid-flight and the repository shrinks about 11 GB, because the un-committed tail rolls back on stop. "Dedup keeps what's sent" only applies to data that made it into a completed savepoint. And switch the source machine's network mid-run and the run dies (the agent is a listener, it never calls home with a new address), then the restarted run re-indexes the rolled-back tail for several minutes while the wire already shows line rate. Plan network switches before the first full, not during it. I did not plan. You're welcome.
The NAS chapter: a repository that refused to exist
Next chapter: the Synology NAS as the repository target, over a private 10-gig link between tower and NAS. NAKIVO supports NFS-share repositories. Creating one through the API is a lesson in how much meaning hides in a field named "optional."
The DTO, assembled one rejection at a time: type NFS_SHARE, repositoryType: "NORMAL" (omit it and the error names exactly this field: a not-null violation, at least it's honest), path: "<host>:<export>" in plain host:path form (not an nfs:// URL), compression: "FAST" as a string (pass a boolean like a sane person and you get "parameter value is invalid" with no further commentary), dataStorageType: "FOREVER_INCREMENTAL", and a transporter ID.
Then the fun starts. The repository stuck at CREATE_PENDING forever. The Director's event log stayed generic. The real error turned out to live in the transporter host's log, not the Director's: Mount script failed (32), then Failed to initialize storage (71). First trap: the export was locked to the tower's private-link IP (correct security), but the repository was assigned to the onboard transporter, whose host is the Director VM, which has no path to that export. Nothing ever left the box. Repoint the repository to the transporter whose host can actually reach the export and re-read to verify it stuck.
Second trap was the good one. Root could mount the NFS export and write to it fine (Synology's export allows root writes). But every NFS repository NAKIVO created still looked broken. The reason: DSM's share ACL was d---------+, administrators only. The transporter's read/write probe doesn't run as root, it runs as uid 997, and uid 997 could not even traverse into the share. Root writes prove nothing about the product's actual probe. The fix was chmod 777 on the share root (fine here: the export is locked to one IP on an isolated link), plus deleting a stale NakivoBackup directory that the mount script treats as fatal (it exits 101 if the directory already exists), plus removing and re-creating the repository, because the repair function does not unstick CREATE_PENDING. It just doesn't.
While that fight was happening, Synology DSM 7.4 turned out to serve NFSv2/v3 only, so mount options got pinned to vers=3. That combination (NAKIVO's NFS handler, DSM 7.4's v3-only, share ACLs) was the single meanest knot in the whole project, and the honest summary is: the error that names the problem is always one host away from the error that gets shown.
Then, because the story needed it, the NAS pool went into a full RAID-6 rebuild (five 8 TB drives, resync measured at about 55 to 61 MB/s, hundreds of minutes on the clock). Standing rule I've adopted for exactly this situation: never run backup jobs against a NAS target whose pool is mid-resync. The rebuild window is single-failure-tolerance; you don't park your only safety net on top of it. Reads are cheap though, which fact becomes important in the final chapter.
Three failures at 0%, no error anywhere
With the repository finally healthy and the resync grinding along, I built the Proxmox backup job: three VMs, NAS repository, per-disk mappings wired. Fired it. FAILED at 0%. No event. No transporter dispatch. The transporter's own log had nothing but "Idle timeout." Ran it again. Same. A third time. Same.
This is the failure mode that makes undocumented APIs expensive: not the errors, the absence of errors. The RPC layer happily accepts a job it will later refuse to run, tells nobody, and leaves the transporter sipping coffee. If your only windows into the system are the API and the event log, you're stuck.
The unlock came from a change of altitude: I had SSH access to the Director's own VM (it's a small Ubuntu box I built myself, cloud-init, my key in it from day one). Its log directory carries the whole story. The run plan is logged action by action, and the failure reason is written where the UI never looks:
[JOB-2/TEST dummy-vm01 to NAS-BDR01]
Root cause, confirmed in the logs: the per-disk mappings I thought were wired were empty on the object the pre-flight actually inspected. Same rung as the physical job's rung 3, wearing a different hat. The mappings for Proxmox VM jobs use the VM's live disk inventory (PROXMOX_DISK-<n> with a sourceIdentifier like local-zfs:vm-101-disk-0), and empty mappings equal silent pre-flight rejection. Fix, re-run: activity completed clean. 463 files landed in the repository, 775 MB on disk for a 3.5 GB virtual machine after dedup and compression. First backup on the rebuilt NAS.
A silent null is not "no error." It is an error the API declines to report. When an API fails quietly, the truth is always in the logs on the box that runs the code. Get shell access to that box on day one, not as a last resort.
One more discovery while I was in there, because it made the wait productive: the run call accepts a sourceVids list with runType: "SPECIFIC", so you can run one machine out of a multi-VM job. That's how a 3.5 GB test VM got its first full while a 128 GB first full for the other two VMs waited behind the RAID rebuild. Undocumented, and it's exactly the knob you want when your repository host is mid-rebuild and you want to keep testing without stacking a real backup on a rebuilding pool.
That same run call had one more secret, and it cost me a day to find it. For testing I wanted a real FULL backup on demand: re-read the whole source, fresh savepoint, no dependence on the chain. The run request has a backupType field with a FULL value, I sent it, the run completed green in seconds, and the repository barely grew. I had asked for a full of a 3.5 GB machine and the Director quietly moved ten kilobytes. No warning, no error, no event. The job ran, and what it ran was an incremental.
The answer was in the product's own request class, mined out of the JAR the same way the JobOptions fields were: the run request carriestwo fields, backupType (the one I sent) and fullBackupMode (the one I didn't know existed). Send the type without the mode and the mode-selection logic has no enum value to land on, so it falls through the chain and quietly picks the incremental default. The UI's run dialog always sends both, which is why clicking Full backup in the product works while the API call silently lies. With the pair sent together, the same run moved 54.7 GB for the 64 GB server, and the small guest re-read its full 1.9 GB. Field-proven on all three VMs.
And this is where the truth-meter got an upgrade. A content-addressed repository cannot tell you full from incremental by size: a fresh full of unchanged data references the blocks it already has, so the directory grew about half a gigabyte while the run re-read 55 GB. The honest meter lives one SSH away, in the Director's ownjobs.log: every run writes its true transfer total (totalDataCopied). The disk still always says the truth, but the run plan now says it first.
The finale: booting a VM straight off the backup
The whole point of a BDR product is the recovery side. NAKIVO's instant recovery for hypervisor VMs is called Flash VM Boot, and the mental model is a linked clone off the backup datastore: the hypervisor registers a temp VM whose disk is served read-only out of the backup repository, writes go to a throwaway redo on the hypervisor's own storage, and the backup itself is never modified. Boot in seconds-to-minutes. Then you choose: keep it running, permanently commit it (live-migrate the disk to real storage), or discard.
For Proxmox, this feature is not a documented API call either. But the descriptor had a job type called FLASH_BOOT, and the recovery actions in the catalog had names like checkAndCreateRecoverySession. So: bisect ladder time. Every attempt that failed silently went to the Director's logs, every log line named the next missing piece, and four rungs got climbed in two evenings:
Rung 1: the four-slot target. The flash-boot job's container target is an array with exactly four slots: boot host, storage for the redo, network, resource pool. Send three slots and the rejection (server-side only, of course) says FeatureNotSupportedException: bad LU target count, got 3, 4 expected.
Rung 2: the poison field. The backup job uses targetVid on the object for its destination. Flash boot wants the boot host in a different field, targetLuVid, and if targetVid is present at all the save rejects silently. Two job types, same API, one field that flips meaning and one that turns fatal.
Rung 3: options can't be null. Omit the options block entirely and the run dies with JobOptionsDto ... getPostScriptExecutionMode() because "jobOptionsDto" is null. So the options object is mandatory, not decorative.
Rung 4: the one NPE that took the longest. With everything else filled, the run died one second in: JobOptions.getGenerateMac() is null. A boolean. The field that says "generate a new MAC address for the temp VM." The GUI wizard fills it in for you so quietly you'd never know it exists. The API leaves it null and the run path steps on it.
I stopped guessing at rung 4 and went to the source, literally: extracted the flash-boot code classes out of NAKIVO's own JAR on the Director VM and walked the constant pools for every JobOptions getter the Proxmox flash-boot path actually reads. Eight fields. I pre-filled all eight with valid values, enum strings mined the same way, and the next run went green on the first try.
Then this happened, and it's the part I keep re-reading: about 35 to 45 seconds after I fired the run, a temp VM appeared on the Proxmox host, powered on, booting from a backup that lives on a NAS whose RAID array was still rebuilding underneath it. VMID 103 on the tower. Its disk config pointed at a transporter-served block device: the backup repository serving blocks over the private link. Its writes landed on local NVMe. Its NIC was deliberately NOT_CONNECTED: a recovered copy never touches the production LAN while the original exists, that's the iron rule and the API let me build it in from the start.
Boot evidence without a console (the temp VM registers with a serial-only video config and no serial socket, and this particular image has no guest agent, so screenshot paths were all dead): the QEMU process pulled about 47 MB through the transporter disk at boot, kernel and initramfs and rootfs, then sat idle. The NAS private-link traffic went flat in steady state. The RAID resync didn't blink. The Director's own log declared the job state "RUNNING_VMS," which is its way of saying: VM's up, I'm watching it, your move.
Teardown is one call: stop the job and the temp VM is destroyed, changes discarded, backup untouched. That took seconds, verified the temp VM vanished, and closed the loop. A backup that restores to files is a file server. A backup you can boot in under a minute is a parachute.
The follow-up round went down the checklist. Both production test servers (the Wazuh manager, and a second NAKIVO Director instance) flash booted off their real backups on the NAS and reached their login prompts on tty1. The second Director case was the one I was watching: a recovered copy of the backup software itself, booted with its NIC still NOT_CONNECTED while the real Director keeps running. No fight for the IP, no drama, and the job state was back to idle seconds after the stop. Registration latency scales with disk size: about 50 seconds for the 3.5 GB dummy, about 4 minutes for the 64 GB servers. The first fulls landed the same morning: three VMs, the repository on the NAS grew from under a gigabyte to 20 GB, and the combined run took about two hours wall clock (thin mode spends most of its wall clock skipping the empty parts of 64 GB disks; the actual copy runs at GbE wire speed on the private link).
And the screenshots, because "it booted" deserves pixels. First round the temp VM was console-blind: it registers with a serial-only display config and no serial socket, so every screenshot path was dead and boot proof was QEMU process counters plus the Director's log. This round I wanted photos. For the two servers, easy: their savepoints carried a normal VGA config, and a QMP screendump straight off the running QEMU process on the hypervisor handed me the console. Both showed the same shape: kernel messages, then a login prompt. The recovered operating system, running off blocks served out of the backup repository, asking for a username.
The dummy was the stubborn one: its console really is serial-only, and you cannot hot-add a display to a running QEMU. The trick that worked: qm set --vga std on the temp VM config, then a full stop and start of the QEMU process. That is the part I would have gotten wrong a week ago: a guest reset does not re-read the device config, only a full stop/start of QEMU does. The flash boot session survived the hypervisor-level restart, the transporter kept serving the base disk the whole time, and after the restart the same QMP screendump worked. One more trap for the road: piping the screendump helper to the remote host as a JSON-escaped command line mangles it into a syntax error whose own error text contains the word my success check greps for, so the tool reported success while producing nothing. Send the program on stdin, parse the final JSON line for the actual return key, and verify the file exists before you celebrate.

VMID NAME STATUS MEM(MB) BOOTDISK(GB)
100 director running 8192 64.00
101 test-vm-a stopped 2048 3.50
102 test-vm-b running 4096 64.00
103 test-vm-a running 2048 0.00 <- flash-boot temp, disk served from the repo
The permanence question: settled
The finale left three choices on the table: keep the recovered VM running, commit it permanently, or discard. The third is one click. The first is no work at all. The second is where the product docs, a well-regarded community guide, and the actual behavior of the software all disagreed, so I settled it in the lab with checksums.
The community recipe is seductive: with the recovered VM still running, do a hypervisor Move Storage of its disk to real storage, then click Discard in NAKIVO. The guide says the VM keeps running with its disk now local, retaining every write made during the flash boot window. The move itself works exactly as advertised: an online drive mirror of the served base disk plus the throwaway redo into a real local disk, no reboot, no downtime. Three and a half gigabytes in ten to thirteen seconds, and every checksum I had planted inside the guest matched afterwards. Then I clicked Discard.
Discard deleted the temp VM and the freshly migrated disk with it. Under three seconds, verified on the hypervisor: both the recovered copy and its new local disk, gone. The official guide's "Discard always removes the VM" is not conservative boilerplate on this build (v11.2.2 with Proxmox 9.2); it is an accurate description of a cleanup that reaches whatever the VM's disk points at, even after you moved it out from under the session. Follow the community recipe and you lose every write the guest made during the flash boot window, permanently. I verified that twice before believing it.
The path that works: re-home before you discard. NAKIVO's cleanup can only reach the VM it registered, so you hand the disk to a VM it has never heard of. Shut the temp VM down, detach its disk, rename the disk to a fresh VM ID, create an ordinary VM around it, boot it. Now discard: NAKIVO destroys its empty shell and never touches the copy. Checksums after the discard: all present. The recovered VM is now just a VM, running from local storage, holding everything it wrote while it was a parachute. The official pattern (flash boot as a stopgap while a full restore runs in parallel from the same savepoint) is still the zero-effort path; it just throws the window's writes away. This one keeps them for about a minute of operator work.
The sequence, as run (twice: once to fail, once to pass), is in The commands below, annotated with the timings from both test rounds.
One root-cause bonus from the same night: a flash-booted guest that sits "mid-boot" forever usually has nothing to do with NAKIVO. The recovered VM's config is copied from the source VM, and a source built without an explicit SCSI controller type inherits Proxmox's ancient LSI default, whose driver the Ubuntu cloud-image initramfs does not ship. The guest parks at "LABEL=cloudimg-rootfs does not exist" while QEMU happily keeps serving it blocks. The fix is one line: set the controller to virtio-scsi and restart the guest. Better, set it once on the source VM; the config gets copied forward and every future flash boot from that source just works. Which means the "mid-boot" console photo earlier in this article is exactly that stall, not a healthy boot: the two production servers reached real login prompts, the little test guest never left initramfs. Honest pixels. And the standing lesson: "running" in the hypervisor only proves the kernel was loaded. Verify userspace before you trust a flash boot.
The JobOptions fields, one by one
This is the section I wish existed when I started. The options block on a job is where the API's two personalities live, so here's the full walkthrough, from save-time to run-time.
Layer 1, save-time validation. The server validates a handful of fields at save and rejects nulls on exactly those. profilingEnabled is the famous one on backup jobs (null it and you get a property exception; false is the working value). The save layer is tolerant: most fields can be omitted and the server fills defaults. That tolerance is a trap in itself, because it trains you to send minimal payloads.
Layer 2, run-time reads. The run path reads a different set of fields, and for flash boot jobs the server defaults nothing. This is the asymmetry that cost the final day: a job that saves fine can die at run time on a field the save layer never asked about. The eight getters the Proxmox flash-boot path actually reads, mined from their bytecode:
| Field | Values that work | What it does |
|---|---|---|
generateMac | true (Boolean, non-null) | New random MAC for the temp VM. Null = the NPE that killed a whole evening. The wizard fills this silently. |
powerVmsOn | true | Power the recovered copy on after registration. |
namingType | ASIS / APPEND_AFTER / USE_FROM_REPLICA_INFO | Temp VM naming. ASIS keeps the given name. Observed quirk: the temp VM registered under the source VM's name anyway. |
vmVerificationType | NONE / SCREENSHOT_VERIFICATION / BOOT_VERIFICATION | Post-boot verification stage. NONE for a controlled test. |
encryptionMode | NONE / NORMAL | Drives the internal use-backup-encryption flag; NONE keeps the encryption-password lookup out of the path. |
transporterMode | AUTO / SAN / LAN / HOT_ADD | How the data path picks its transporter. AUTO everywhere. |
profilingEnabled | false | The save-time load-bearing null trap. |
preScriptExecutionMode / postScriptExecutionMode | NEVER / ALWAYS | Pre/post job hooks. NEVER. The missing-options NPE names the post-script getter, which is how you learn these exist. |
Two fields turned out to be harmless insurance: recoveryType (SYNTHETIC / PRODUCTION) and the script modes are not read at the object level on this build. I set them anyway and I'd do it again: pre-filling a field with a valid enum string costs nothing; discovering the next NPE costs a log round-trip.
Layer 3, the rule underneath it all. The enum strings must match the product's own enums exactly, and those live in the product's JAR files, not in any documentation. Every enum is an inner class with ALL_CAPS values, extractable with a 30-line Python zipfile pass over the constant pool. NAMING_TYPE {ASIS, APPEND_AFTER, USE_FROM_REPLICA_INFO}, VM_VERIFICATION_TYPE {NONE, SCREENSHOT_VERIFICATION, BOOT_VERIFICATION}, and so on. When you send a string the server doesn't recognize, you get the generic "parameter value is invalid," which is the API's way of saying "close, but I'm not going to tell you the list."
What I'd tell someone else
- The API is the UI's own chatter. If there's no docs page for what you need, open the browser dev tools, click the thing once, and read the request. Then find the descriptor at
/c/apiand you have the full surface with argument counts. - Every error string names the next thing to mine.
empty value in X= add field X.The parameter value is invalid= your top-level shape is wrong. An NPE namingSomeDto.getFoo()= fill exactly that field. The errors are terse, not useless. - When it fails with no error at all, stop poking the API. SSH into the box that runs the product and read its logs. Run plans, stack traces, and real rejection reasons live there. This one habit was the difference between three silent failures and a solved bug.
- Mine the client, not the docs. The UI's JavaScript bundle contains the exact call shapes the product itself uses (including the positional-argument quirks the descriptor hides). The JARs contain every DTO field and enum value. Both are on the box you already have shell access to.
- If the API won't give you bytes, read the run's own logs. Progress percentages lie by design here (per-step, phase-weighted, occasionally backwards). The Director writes true per-run transfer totals to its
jobs.log(totalDataCopied): that is the number that has never lied to me. Adudelta on the repository directory is still the "did anything land" check, but on a content-addressed store it cannot tell you full from incremental: unchanged blocks get referenced, not re-stored. - Never trust a run flag alone. Per-object results, real object count, disk growth: in that order. Zombie objects stamp completed runs FAILED and disabled jobs sit in silence.
- Version-pin everything you learn. The descriptor shifts between releases, and behavior shifted under me between weeks on the same version. Re-pull
/c/apion every bump and re-verify one known call before trusting anything else.
The recovery playbook: what you can do
This is the section I wanted to exist before I started: every way to get a VM back from a NAKIVO backup on Proxmox, all tested on this stack (v11.2.2 with Proxmox 9.2, repository on the NAS over a private 10G link). One term first, because it's the hinge of the whole thing: the mirror is the hypervisor's online Move Storage step (qm move-disk), a live block-level copy of the served base disk plus the throwaway redo into one real disk on local storage while the guest keeps running. The mirror itself is flawless and was never the problem. Ownership was: NAKIVO's cleanup reaches whatever the temp VM's disk points at, so what you do after the mirror decides whether you keep the data.
| Option | What happens | Measured here | Verdict |
|---|---|---|---|
| 1. Full restore | Restore a fresh VM from the savepoint to production storage. NAKIVO's documented pattern for Proxmox: flash boot as the stopgap in parallel, cut over, discard. | A full block copy from the backup. Not timed here; it's the slow lane by definition. | Always works. Slowest option, and the flash-boot window's writes are thrown away. |
| 2. Flash boot, as designed | A temp VM runs straight off the backup (reads cross the network), writing to a throwaway redo on local storage. A pure parachute. | Running in 16 seconds for a 64 GB server over the fiber link (about 4 minutes for the same server on gigabit); about 50 seconds for a 3.5 GB guest on gigabit. | Works. Discard destroys the VM and every write it made. |
| 3. Mirror alone | Move Storage to local storage while the VM runs, then Discard. The community recipe. | The mirror: zero downtime, checksums intact. Then Discard deleted the migrated disk too, in under three seconds. Verified twice before believing it. | Do not use. Permanent loss of every flash-boot-window write. |
| 4. Mirror, re-home, then Discard | Mirror as above, then hand the disk to a brand-new VM NAKIVO has never heard of, boot it, and only then stop the job. | 64 GB server end to end: about 9.5 minutes, roughly a minute of it operator work (16 s registration, 6m 53s mirror at about 157 MB/s, 11 s shutdown, 5.5 s re-home, instant discard). | The tested recipe. Permanent VM, zero data loss, checksums verified after the discard. |
Why the re-home matters: after the mirror, the disk lives on local storage but the temp VM still belongs to NAKIVO, and its cleanup follows the disk wherever the VM's config points. Rename the disk into a fresh VM ID and build an ordinary VM around it, and the cleanup destroys only its own empty shell. NAKIVO has no knowledge of the re-homed VM and never touches it. The whole re-home block is about five and a half seconds of commands plus one reboot-length blip for the guest.
The last piece of the playbook is the proof layer, and it is the part that makes the whole thing operational instead of heroic. Three small Python drivers over the same API now run the estate's acceptance test without a human: first a timed full backup of every VM, then each VM flash-booted off its own fresh savepoint as an isolated temp VM (network deliberately disconnected), boot-proven live on its console, photographed twice, and torn down; a report email lands with the per-phase timings and the console photos inline, and the delivery itself is verified in the mail logs. The first end-to-end pass: three of three boot-verified with zero manual fixes. The full estate re-read 67.7 GB in about eleven minutes (an earlier identical run took six; the repository's cache state changes re-read speed, so quote a range). Every VM registered about 18 seconds after its run fired and hit a proven-live console at 68 seconds; the whole boot pass, teardowns and photos included, ran seven minutes. A backup you have to click to test is a maybe. One that boots every machine it protects on a schedule and emails you the photos is a fact.
What you can't do (yet)
- Commit a flash boot from inside the product on Proxmox. There is no in-product commit on v11.2.2: the flash-boot state machine has no committed state, and the entire web app issues only run and stop for it. VMware customers get live storage migration in the product; Hyper-V gets an offline disk copy; Proxmox gets the parallel-full-restore pattern above.
- Keep the recovered VM by removing the job. The UI's own button string says "Remove the job and keep the recovered VM." On Proxmox that is false: Discard removes the temp VM and whatever its disk points at (option 3). The re-home in option 4 is the only way to keep anything.
- Trust the API's progress numbers. Progress is per-step, not per-job, and has been observed over 100% and moving backwards. There are no byte-level stats in the API responses; the meters that never lie are the transfer totals in the Director's
jobs.logand, with the dedupe caveat above, adudelta on the repository directory. - Get an error message when a shape is wrong. Bad shapes save and run with
{data: null, error: null}and no event. The real reason is always in the Director's own logs over SSH (jobs.log,system_exception.log). - Pull a support bundle through the API (the call rejects an empty "command" argument and I never found the right one), or read the Director's H2 database(AES-encrypted with a key derivation I haven't cracked; the logs gave up everything anyway).
- Bare-metal restore is its own saga with its own one-flag fix, written up separately: a restore that took a day and ended in a single QEMU setting.
Still queued: the SYNTHETIC full-backup mode (the other enum the run request accepts; synthesize-from-chain instead of re-reading the source, untested here), and an optional side-by-side with Proxmox Backup Server's live-restore (needs a PBS repository on the NAS, which this stack doesn't run). This article stays open; when there's more to report, it gets updated.
The commands
Everything needed to reproduce the playbook, annotated with the measured timings from both rounds (3.5 GB guest, 64 GB server). API side first, hypervisor side second, then prevention and verification.
# --- API side (Director, https://<director>:4443/c/router, Ext.Direct JSON-RPC) ---
AuthenticationManagement.login([user, password, true]) # sets the session cookie
InventoryManagement.list [{nodeType: "BACKUP_REPOSITORY", nodeId: N}]
# -> BACKUP_OBJECT-<n>: the VM's backup
BackupManagement.getSavepoints ["BACKUP_OBJECT-<n>"] # -> SAVEPOINT-<n>: the recovery point
InventoryManagement.getNodes [true, ["BACKUP_OBJECT-<n>"]]
# -> SAVEPOINT_DISK-<n> + NIC vids for mappings
JobManagement.saveJob [...] # FLASH_BOOT job: 4-slot container target,
# targetLuVid on the object (targetVid is
# poison), all eight JobOptions fields filled
JobManagement.run [{"jobIds": [N], "runType": "ALL"}] # data:null on acceptance is normal
ActivityManagement.getActivities [...] # watch the run; temp VM appears on the host
JobManagement.stop [{"jobIds": [N]}] # Discard: temp VM + delta destroyed
# --- API side: a real FULL backup on demand (the two-field secret) ---
JobManagement.run [{"jobIds": [N], "runType": "SPECIFIC",
"sourceVids": ["PROXMOX_VM-<n>"],
"backupType": "FULL", "fullBackupMode": "ACTIVE"}]
# BOTH fields or the run is a silent incremental: the mode-selection chain has
# no enum value to land on with the mode missing, so it falls through.
# backupType alone looks like it works: the run completes green, instantly,
# and moves 10 KB. The UI always sends the pair.
# Measured fulls on the 10G link: 3.5 GB guest 31-91 s, 64 GB servers 3.5-5 min.
grep -o "totalDataCopied=[^,]*" /opt/nakivo/director/logs/0/jobs.log
# per-run transfer totals: the ground truth for what a backup actually moved
# (repository du is NOT: unchanged blocks dedupe away, a full can add 500 MB)
# --- Hypervisor side: the commit recipe (the guest never goes down during the mirror) ---
qm move-disk 103 scsi0 local-zfs --delete
# online drive-mirror: 3.5 GB in 10-13 s; 64 GB in 6m 53s (~157 MB/s), zero downtime
qm shutdown 103
# ACPI shutdown: 11 s on the 64 GB server (hot detach is refused while running anyway)
qm set 103 --delete scsi0
# refused while running ("can't unplug bootdisk") - hence the shutdown first
zfs rename rpool/data/vm-103-disk-0 rpool/data/vm-104-disk-0
qm create 104 --name recovered-vm --cores 1 --memory 1024 \
--net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-single \
--scsi0 local-zfs:vm-104-disk-0,iothread=1,size=64G
qm start 104
# re-home block (detach + rename + create + attach + start): 5.5 s
# re-homed boot to login prompt: ~50 s
# flash boot to permanent, 64 GB server: ~9.5 min total, ~1 min of it operator work
# --- Prevention and verification ---
qm set <source-vmid> --scsihw virtio-scsi-pci
# BEFORE the first backup: flash boot copies the source config; a source without an
# explicit SCSI controller inherits PVE's LSI default and the guest never boots
lsiscsi # after a clean discard: zero sessions
zfs list # re-homed disk survived, real data intact
qm list # temp VM gone, re-homed VM presentThe pitfalls
- The "mid-boot forever" stall: no SCSI controller type on the source. NAKIVO copies the source VM's config into the temp VM. A source built without an explicit
scsihw(typical for VMs created by hand on the CLI) inherits Proxmox's ancient LSI default, whose driver the Ubuntu cloud-image initramfs does not ship: the guest parks at "LABEL=cloudimg-rootfs does not exist" while QEMU keeps serving it blocks. Setvirtio-scsionce on the source and every future flash boot from it just works. (The "mid-boot" console photo earlier in this article is exactly this stall, not a healthy boot.) - Discard deletes whatever the temp VM's disk points at, including a disk you just migrated to local storage. Ownership, not the mirror, is the hazard.
- Hot detach is refused.
qm set --delete scsi0on a running temp VM fails with "can't unplug bootdisk." Shut down first, then detach. iothread=1is silently ignored withscsihw virtio-scsi-pci(it only takes effect withvirtio-scsi-single). The attach warns; the disk works. Harmless.- The re-homed copy carries the source's whole config, including its static IP. Boot it isolated (NIC down) or two machines fight over one address while the original still runs.
- One-shot flash-boot jobs self-remove on stop. After a Discard the job is gone (read-back returns null), so don't script a follow-up delete against nothing.
- "Running" in the hypervisor is not "up." The QEMU process can sit in initramfs forever. Verify userspace: console (a QMP screendump works even on serial-configured temp VMs), SSH, or a DHCP lease, before you trust the recovery.
- Re-firing a run while the previous activity is still finalizing is a silent no-op (
data:null, no temp VM, no error). Check that the last activity is terminal first. - Nobody touches the job while a flash boot runs. Stop or remove, either flavor, destroys the running recovered VM in about eight seconds.
- The NIC stays NOT_CONNECTED. A recovered copy never touches the production LAN while the original exists. The API takes the literal
NOT_CONNECTEDvid as the network target; build it in from the start. - The temp VM is console-blind by default(serial-only video, no serial socket registered) and usually has no guest agent. Boot proof: a QMP
screendumpstraight off the running QEMU process, or QEMU's read counters plus the Director'sjobs.log. - When the API fails silently, read the Director's own logs over SSH (
/opt/nakivo/director/logs/0/:jobs.logfor the run plan,system_exception.logfor stacks). One habit, and it was the difference between three silent failures and a solved bug. backupTypewithoutfullBackupModesilently runs an incremental. The run request carries both; the mode-selection chain has no fallback for a missing mode, so it completes green, fast, and moves almost nothing. If a "full" finishes in seconds, that is what happened.- Repository size cannot tell you full from incremental. The store is content-addressed: a fresh full of unchanged data references blocks it already has, so the directory grows by half a gigabyte while the run re-read 55 GB. Read
totalDataCopiedin the Director'sjobs.log. - Savepoint counts stop moving once retention caps the chain. The job keeps 2 savepoints, so a fresh full evicts the oldest and the count never changes; the API's latest-savepoint field also reads null on this build. Detect new savepoints by diffing the ID sets from
BackupManagement.getSavepoints, not by counting.
Test environment: HP Z6 G4 tower with Proxmox VE 9.2.2 (ZFS root mirror, boot from NVMe), NAKIVO Backup & Replication v11.2.2 trial running on an Ubuntu 24.04 VM (2 vCPU, 8 GB RAM) on that tower, Synology DS1823xs+ on DSM 7.4 with 5x8 TB in RAID 6 serving NFSv3 over a private link, test VMs from Ubuntu cloud images. September to October 2026. All backup runs during this story were test VMs on a blank repository target: zero production data exposure, and the production first-fulls stayed gated behind the RAID rebuild on purpose.
