Can't mount VHD in Windows

I’ve got a server backed up using UrBackup using image backups, and I need to restore a file from a drive on it- the drive is a GPT partition, partition size is 3+TB, actual size is about 1.1TB. This isn’t normally a problem- I can mount the image just fine from the web interface. The issue is, I need to restore from a backup that has since been purged due to age. I have the UrBackup server itself backed up to the cloud, so I was able to get a copy of the image, but obviously since it has been removed from the database, it’s not visible in the web interface to mount.

UrBackup Server version 2.2.11
running Windows 10 Pro 20H2
Image was taken using standard VHD image backup
The drive is a GPT partition, partition 5, partition size 3.82TB, used size 1.15

I installed imdisk tools to try and mount the drive manually, but I can’t get it to actually mount. If I double-click it, I get an error which reads “Couldn’t Mount File: The disc image file is corrupted”. The problem is, I get that same error message when trying to do the same with a current full-image backup of the same drive, but the web interface mounts it without a hitch. If I try to mount the file using the ImDisk driver interface, Windows does not recognize the volume and prompts me to format the disk.

Is there some way to either trick the web interface into seeing this image file so I can make the server mount it for me, or some command line that I’ve overlooked to properly mount this image?

Is any of the information here any help?
In Windows C:\Program Files\UrBackupServer\AssembeDiskImage.bat may prove useful, given what you’ve said so far.

I don’t want to restore the image to the client machine, I just want to be able to mount the image to pull a few files off it, so I’m not sure that link really has anything for me.

As for the assemble image batch file, I couldn’t find much documentation on how to properly use it. I ran the file by just double-clicking from Explorer, selected only this image file I’m trying to access, then hit Cancel, then told it where to output the assembled image. The first time I tried that, it errored out shortly after starting, but this morning it appears to be actually starting. I’m just glad I’ve got the 3-4 terabytes of free space to actually do this.

Ah, no luck. Just failed at 15%:

2021-02-09 08:43:51: ERROR: Trying to write beyond partition

From the administration manual:

10.5 Mounting VHDs as a volume on Windows

Starting from Vista Windows can mount VHD files directly. If the VHD files are compressed, they need to be decompressed first (see next section 10.6). Then go to system settings->Manage->Computer management->Disk management->Other Actions->Add Virtual Hard Disk. Mount the VHD file read only. The image will appear as another drive in the explorer. It may not work if the VHD file is on a network drive.

You might need to copy it to local storage or a USB external drive if you’re currently trying to mount it where it is.

It is local. The original is on a USB drive sent from our backup provider, and after that failed, I copied it to the server’s local storage drive.

Also, windows disk management will not mount it. Thought I had included that in the original post, but apparently I forgot to include that.

I’m not sure what the solution is, & this might be a sledgehammer to crack a nut, but at this point & being stumped, I’d try restoring to a virtual machine & exporting the file(s) from that, or it’s associated virtual disk.

Well I think I’ve made some progress, but now I’m a bit stumped. I’m trying a manual restore as you suggested, but I’m running into more issues. Here’s what I’ve done so far, following the instructions you linked:

  • I’ve created a VM with a virtual disk large enough to be the restore target
  • Booted it into the recovery disk and dropped to terminal
  • Mounted the urbackup server’s storage drive to /mnt/<servername>
  • Restored the MBR from the backup and re-read the partition table

But at that point, I try to restore the actual disk image to sda1 and get:

ERROR: Writing to output file failed

EDIT- disregard, dumb mistake on my part. I checked the contents of /dev and realized it had recreated the partition table of the whole drive. Since the volume in question was originally partition 5, I think I have to restore to sda5. Trying that now…

VHDs have a ~2TB size limit. That could be what is causing those issues… I hope UrBackup itself is able to read it!

I think this check didn’t work because the used space is lower than 2TiB:

Yeah, like I said, the web interface can mount backups of that volume just fine so long as the actual used space is below 2TB- we’ve run into that before. It’s on my to-do list to shrink that volume and split off different shared drives into their own partition on the fileserver, but for now it’s functional. Out of curiosity, is this a limit of the VHD format, or is there a possibility of a future update to UrBackup patching in support for large drives like this?

At any rate, the process of restoring the image to a dummy VM seems to be progressing okay for now- 62% and counting right now. Will probably have to wait until tomorrow morning at this point though, 'cause I doubt it’s going to finish in the next half-hour before 5PM.

It’s a limitation of the VHD format, VHDX would need adding, or if you can use ReFS for the backup store (I can’t in my setup) you might be able to use raw image format instead, some discussion here

Yeah, unfortunately I can’t either, as my backup server is running Win10.

May try and just switch this machine over to file backups, so that if I ever need to pull from offsite backups in the future, I can just browse the backup folder instead of having to request the whole image be sent to me on a portable HDD. Cheaper, faster, and way less of a PITA than all this has been. Live and learn, I guess.