NetApp Learning Services Discussions

NetApp CLI and Windows Folders with Spaces

DFARLEY10
4,493 Views

A real newbie here doing some testing and experimenting Using the "Lab on Demand Intro to NetApp" in Cluster Mode. 

When attempting to restore an individual file to my Jumphost, Windows Server using the NetAPP CLI, I get a file not found in Snapshot message.

I enter the following command:      

     <Cluster1::> volume snapshot restore-file -vserver svm1 -volume Engineering -snapshot Vol_Engine -path /Large Copy/RHEL2/putty.log

           It errors with the following reason:       Reason: File /vol/Engineering/putty24.log not found in snapshot vol_engine.

If I go back to the Windows server that has access to that directory and rename the folder to "LargeCopy" (no spaces),  take a new snapshot, modify or delete a file, "Snapshot restore-file" works.

How does NetApp treat spaces in directories or folders created by Windows?  What should my command line look like after the "-path" parameter?

1 REPLY 1

ivelb
4,307 Views

I received the following feedback from a NetApp Instructor:

 

 

"You guessed right.  If you think about it, it makes sense that you need to treat spaces specially.  If you have a parameter:

                -foo filename

Then the command line parse is looking for the minus sign, then the parameter then the value.  If the file name is:

                cool-file

That’s fine because it knows to treat it as a unit.  If it is:

                cool   –file

The parser sees “cool” think that is the filename, sees the next minus sign and figures that is another parameter.  Then it says “heck, I can’t find a   file named ‘cool’ and I have no idea how I am supposed to ‘file’”."

 

Hope that helps.

Public