I’m currently implementing UrBackup on our company’s servers. I’m really liking the tool so far and believe it will be very useful for us. We currently have 3 Hyper-V hosts running Debian and Windows VMs.
I downloaded the commercial Hyper-V client and my initial tests went well. Disk backups are working perfectly, and I successfully restored a VM using the hyperv_load_backups.ps1 script.
The Problem (Cross-Hypervisor Restore): The limitation I’ve run into is that I cannot restore a backup from one hypervisor onto a different hypervisor. For example: If a VM runs on hypervisor02 and that host fails, how can I restore it onto hypervisor01? I need to ensure this is possible for our Disaster Recovery plan.
Permission Error: To test this scenario, I ran the command on the server “ServerTeste2” while trying to fetch the VM “[Windows1]” (which originally belongs to the “ServerTeste” host):
It returns a “No Rights” error. The VM name is correct and I am using an admin user with full access. It seems the system restricts one host from accessing another host’s backups.
Thank you so much for the quick reply and for being willing to add this setting!
Do you have any ETA on when you might be able to implement this?
To give you a bit more context on my use case: my main goal is to ensure I can restore VMs from any hypervisor to any hypervisor, regardless of the original VM name or its settings.
Since I know UrBackup backs up the disks but doesn’t save the VM’s hardware configurations, I am storing those settings in my own database. My disaster recovery plan is to use an automated script that reads this database, creates the bare VM with the correct specs, and then fetches the corresponding backup from UrBackup to restore the disks.
The crucial part is that this workflow needs to run from any host. For instance, if a major catastrophe happens and all 3 of my current servers burn down, I need to be able to spin up a completely new host, run my script, and pull the backups without hitting this permission block.
Do you think the new permission/setting you mentioned will cover this scenario? Thanks again for your help!
Yeah, basically only the credentials you enter (admin & password) would matter if the setting is checked.
Might get to this today or tomorrow.
Urbackup does backup the VM configuration (but no restore…). Basically the MBR file is a zip file of the configuration (vmcx file). And the mbr file can be loaded with a script as well. So if you need some more restore functionality please give me a heads up as well – the ingredients should be there.
That is fantastic news! Knowing that UrBackup already backs up the VM configurations inside the .mbr file makes this even better for my project.
How can I structure the workflow to fetch these files directly to my Hyper-V server? Here is the scenario I have in mind:
Install the commercial Hyper-V client on the target host.
From there, what would be the best practice or the exact command/PowerShell script I should execute to fetch any backup from the UrBackup server and restore both the image and the configuration onto this new hypervisor?
To give you some context on why I need this: I am developing a custom executable (.exe) to automate Disaster Recovery in our environment. The goal is to be able to run this .exe on a brand new Hyper-V server, list and select a backup stored on the UrBackup server, and have my application automatically trigger the full restoration (configurations + disks) directly on the host where the tool is running.
Which client command (UrBackupClientBackend.exe or the .ps1 scripts) would you recommend I call under the hood in my application to make this bridge?
Inside my .exe, I will also need a function to fetch all available backups. I plan to use the Python Web API wrapper (https://github.com/uroni/urbackup-server-python-web-api-wrapper) so I can list the machines, choose which one to restore, and then execute the restoration and VM creation commands on Hyper-V. Any insights on marrying the API with the CLI/scripts would be greatly appreciated!
I think the most straight-forward way would be to call the same commands as in the powershell scripts. They return json.
You can get the clients via --restore_cmd get_clientnames, though that one does not return json.
If you use download_mbr restore cmd with the same parameters as download_image it writes the config zip files to --restore_out if the extension is not vhdx/vhd (so use something like config.zip). Currently there is a bug, that the file already needs to exist (will be fixed with the next version), so as a work-around perhaps create a zero-byte file in the output location.