ONTAP Discussions

Trying to restore a VM with snap restore on NFS fails.

DRUMDUDESAN
2,341 Views

Note:VM folder-name (b9131474-2624-4b48-b6ef-8e23a4747d96) is the original VM folder name

Hi,

Environment: NetApp 3140 ONTAOP 8.01 7-mode filers exported to ESXi server via NFS.

Problem:  Cannot restore a VM that was deleted in vSphere from snapshot

Syntax: filer> snap restore -t file -s nightly.3 "/vol/silver07/VM folder-name (b9131474-2624-4b48-b6ef-8e23a4747d96)"

WARNING! This will restore a file from a snapshot into the active filesystem.  If the file already exists in the active filesystem,it will be overwritten with the contents from the snapshot.

Are you sure you want to do this? y

You have selected file /vol/silver07/VM folder-name (b9131474-2624-4b48-b6ef-8e23a4747d96), snapshot nightly.3

Proceed with restore? y

snap restore error: Inappropriate file type or format.

Any ideas on what I am missing?

Thanks

Jeff

2 REPLIES 2

aborzenkov
2,341 Views

Only plain files can be restored, not directories.

DRUMDUDESAN
2,341 Views

Hi,

Does snap restore not see a folder as a file like Unix does? If not how can I restore a VM that has been deleted by by vSphere? It seems I must restore each file and create a destination/target source. As proof in point from my test from a snap create test2. I was hoping there was wildcard syntax. As what would you do if you required to restore an entire VM?

filer02> snap restore -t file -s test2 -r /vol/unixshare/atest/ /vol/unixshare/atest/atest2.txt

WARNING! This will restore a file from a snapshot into the active

filesystem.  If the file already exists in the active filesystem,

it will be overwritten with the contents from the snapshot.

Are you sure you want to do this? y

You have selected file /vol/unixshare/atest/atest2.txt, snapshot test2

It will be restored as /vol/unixshare/atest/

Proceed with restore? y

snap restore: Target directory does not exist in active file system.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

filer02> snap restore -t file -s test2 -r /vol/unixshare/junk/atest2.txt /vol/unixshare/atest/atest2.txt

WARNING! This will restore a file from a snapshot into the active
filesystem.  If the file already exists in the active filesystem,
it will be overwritten with the contents from the snapshot.

Are you sure you want to do this? y

You have selected file /vol/unixshare/atest/atest2.txt, snapshot test2
It will be restored as /vol/unixshare/junk/atest2.txt

Proceed with restore? y
filer02> It worked as expected...

Public