Restore - Specifying a single file not working

Hi,

I’m using version 1.2.2 and trying to restore a VM by restoring just the vmdk flat file:

vertical restore myVM -r 3 myVM-flat.vmdk

However, I get an error:
vertical: error: unrecognized arguments: myVM-flat.vmdk

If i use:

vertical restore -r 3 myVM myVM-flat.vmdk

the process continues and says it was successful even, but the vmdk file has not been updated. Here is the output:


Running command: /bin/vim-cmd vmsvc/power.getstate 2, timeout: 30
Retrieved runtime info
Powered off
Removing all snapshots of myVM
Running command: /bin/vim-cmd vmsvc/snapshot.removeall 2, timeout: 600
Remove All Snapshots:
Save backup myVM@esxi4 at revision 3 to the local cache
Downloaded chunk 8d053d397f5a597c0341adfd97c1036dc0a09a756780dcc51d199e917c118a67 from the storage
Saved chunk 8d053d397f5a597c0341adfd97c1036dc0a09a756780dcc51d199e917c118a67 to the local cache
Downloaded chunk 1e6faadfa982227e080b1005e2e41b64ca5a8bda76f05afae2abccebaae8512c from the storage
Saved chunk 1e6faadfa982227e080b1005e2e41b64ca5a8bda76f05afae2abccebaae8512c to the local cache
Downloaded chunk 3fd6723d26eb048235f222a02619a698dd8e4696fb39b21e8b8ebe57f9929dea from the storage
Saved chunk 3fd6723d26eb048235f222a02619a698dd8e4696fb39b21e8b8ebe57f9929dea to the local cache
Downloaded chunk 65420d4475bb0741b875a2e166d4f67d90de038888b9555f85a34a53d6da1da9 from the storage
Downloaded chunk 8fe26be881ccece7b9b6a412c34db0973ff52d06611589afe49a83369668b1bd from the storage
Backup myVM@esxi4 at revision 3 has been successfully restored to /vmfs/volumes/datastore1/myVM
Total 0 chunks, 0 bytes; 0 new, 0 bytes, 0 downloaded
Total restore time: 00:00:00
Cleaning local cache
Remove backup myVM@esxi4 at revision 3 from the local cache
Listing chunks referenced in backup myVM@esxi4 at revision 4 in the local cache
Listing chunks referenced in backup VM2@esxi4 at revision 2 in the local cache


If I don’t specify the vmdk file, the restore works fine.
The issue with this is that I’d like to restore only the vmdk file to another location without updating the vmx, and the only way I’ve been able to make it work is by restoring all the files.

Am I doing something wrong?

Thanks, Stefan

You need to specify the full path of the disk file. You can find out the full path by running:

./vertical list --files

You can also use the wildcard matching like:

./vertical restore -r 3 "*myVM-flat.vmdk"

That worked, thankyou!

I then tried to do this using -f or –restore-from to restore to a different volume:

./vertical restore /vmfs/volumes/datastore2/backupVM --restore-from myVM -r 3 “*myVM-flat.vmdk”

but I get a similar error:

vertical: error: unrecognized arguments: *myVM-flat.vmdk

Is it possible to do this?

This should work:

./vertical restore --restore-from myVM -r 3 /vmfs/volumes/datastore2/backupVM  "*myVM-flat.vmdk"

Excellent! That works, thanks for your help.