Tech Tip: Recovering an Incomplete Image
Editor’s note: This tip comes from Nate, one of StorageCraft’s amazing software engineers.
Recently, one of our customers was taking a full backup when the server’s RAID array died, tragically before the backup itself was complete. The customer had no other backup of this server. He asked us if there was any way to gain access to the contents of this partially-complete backup. It turns out, there is.
When ShadowProtect is in the process of creating a backup image file, the image’s file name has a .tmp extension to indicate that the image file is not yet complete. Once complete, the image file is renamed to its final name (with a .spf or .spi extension). This .tmp file was all that the customer had to work with. We had him rename it to INCOMPLETE.SPF and then execute the following three commands from within the cmd.exe command line shell:
- cd “\Program Files\StorageCraft\ShadowProtect”
- set SP_REPAIR_MODE=yes
- sbrun -mdn ( sbset -c “D:\INCOMPLETE.SPF” : sbcrypt -50 : sbfile –wd “D:\COMPLETE.spf” )
The above command (which works on ShadowProtect 3.3+) takes the incomplete backup image file and from it generates a new, complete, backup image file. The new file is complete in the sense that it can be used with the restore and mount tools, even though it will be missing some data (as the backup image file from which it was generated was incomplete). The above commands assume that the files are in the root of the D: drive. If you’re performing these steps yourself, make sure you adjust the paths for your own scenario, and make sure that there are spaces before and after all of the colon ‘:’ and parentheses ‘(‘ ‘)’ characters. If you omit the spaces around these characters, then you’ll get a syntax error. Finally, if your image file was encrypted with a password, the third command (the sbrun command) will pause and wait for you to enter the image’s password before it continues.