<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Invoke-NaSsh or Start-NaNdmpcopy and character encoding in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-or-Start-NaNdmpcopy-and-character-encoding/m-p/118731#M4821</link>
    <description>&lt;P&gt;This was fixed in Netapp Powershell Toolkit 4.0.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However - same error now came back in toolkit 4.1.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2016 15:53:26 GMT</pubDate>
    <dc:creator>mark_schuren</dc:creator>
    <dc:date>2016-04-26T15:53:26Z</dc:date>
    <item>
      <title>Invoke-NaSsh or Start-NaNdmpcopy and character encoding</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-or-Start-NaNdmpcopy-and-character-encoding/m-p/104043#M4287</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm struggling with automating ndmpcopy in a Powershell script.&lt;/P&gt;
&lt;P&gt;It works, but only with English (ASCII) characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#prepare&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;import-module dataontap&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;$cred= (Get-Credential)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # provided root password&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;$controller = Connect-NaController ucnlabfiler07 -Credential $cred&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$srcdir = "/vol/volroot/home/gut"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$dstdir = "/vol/volroot/home/restore"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#both directories already exist on same controller, just for testing&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#start ndmpcopy&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$copy = Start-NaNdmpCopy -SrcController $controller.Address -SrcPath $srcdir -DstController $controller.Address -DstPath $dstdir -SrcCredential $cred -DstCredential $cred -SrcAuthType Md5 -DstAuthType Md5 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# After some time, fetch the result&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Get-NaNdmpCopy&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Id State SrcPath DstPath BackupBytesProcessed BackupBytesRemain&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-- ----- ------- ------- -------------------- -----------------&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;1 SUCCESS /vol/volroot/home/gut /vol/volroot/home/restore/ 23 KB 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, it's generally working fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same also works by invoking ndmpcopy through SSH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Invoke-NaSsh -Command "ndmpcopy $($srcdir) $($dstdir)"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: Starting copy [ 4 ] ...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Notify: Connection established&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Notify: Connection established&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Connect: Authentication successful&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Connect: Authentication successful&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: creating "/vol/volroot/../snapshot_for_backup.48841" snapshot.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: Using subtree dump&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: Date of this level 0 dump: Sun May 3 12:17:43 2015.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: Date of last level 0 dump: the epoch.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: Dumping /vol/volroot/home/gut to NDMP connection&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: mapping (Pass I)[regular files]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: mapping (Pass II)[directories]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: estimated 5 KB.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: dumping (Pass III) [directories]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: dumping (Pass IV) [regular files]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: ACL_START is '16384'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: dumping (Pass V) [ACLs]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: Sun May 3 12:17:46 2015: Begin level 0 restore&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: Sun May 3 12:17:46 2015: Reading directories from the backup&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: Sun May 3 12:17:47 2015: Creating files and directories.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: 23 KB&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: Sun May 3 12:17:47 2015: Writing data to files.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: Sun May 3 12:17:47 2015: Restoring NT ACLs.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: DUMP IS DONE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: RESTORE IS DONE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP: Deleting "/vol/volroot/../snapshot_for_backup.48841" snapshot.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Notify: restore successful&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DUMP_DATE is '5725615559'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Notify: dump successful&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: Transfer successful [ 0 hours, 0 minutes, 9 seconds ]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: Done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, as soon as one of my source or destination path components contains non-English characters, both approaches break:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$srcdir = "/vol/volroot/home/&lt;STRONG&gt;blöd&lt;/STRONG&gt;"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$dstdir = "/vol/volroot/home/restore"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$copy = Start-NaNdmpCopy -SrcController $controller.Address -SrcPath $srcdir -DstController $controller.Address -DstPath $dstdir -SrcCredential $cred -DstCredential $cred -SrcAuthType Md5 -DstAuthType Md5&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#wait a moment&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$result = Get-NaNdmpCopy&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$result&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Id State SrcPath DstPath BackupBytesProcessed BackupBytesRemain&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-- ----- ------- ------- -------------------- -----------------&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;2 FAILED /vol/volroot/home/blöd /vol/volroot/home/restore/ 0 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$result.LogMessages&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[10.230.1.7] Log Message: LogType=2, MessageId=1, Message=DATA&amp;amp;colon; &lt;STRONG&gt;Operation terminated: backup configuration failure (2) on RPC error: ERROR: BAD ENV OP (for /vol/volroot&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;/home/bl\0366d&lt;/STRONG&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same happens with SSH invocation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;PS C:\Users\mark&amp;gt; Invoke-NaSsh -Name $controller.Address -Credential $cred -Command "ndmpcopy $($srcdir) $($dstdir)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: Starting copy [ 5 ] ...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Notify: Connection established&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Notify: Connection established&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Connect: Authentication successful&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Connect: Authentication successful&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: DATA&amp;amp;colon; Operation terminated: backup configuration failure (2) on RPC error: ERROR: &lt;STRONG&gt;BAD ENV OP (for /vol/volroot/home/bl\0366d&lt;/STRONG&gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Connection halted: HALT: Internal error!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: ucnlabfiler07: Log: RESTORE: Error: Read Socket received EOF.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: Notify: Transfer failed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Ndmpcopy: Done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other cmdlets like Read-NaDirectory or New-NaDirectory accept (and return) the umlaut:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Read-NaDirectory /vol/volroot/home/blöd&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Name Type Size Created Modified Owner Group Perm Empty&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;---- ---- ---- ------- -------- ----- ----- ---- -----&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;. directory 4 KB 03.05.2015 03.05.2015 0 1 777 False&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;.. directory 4 KB 24.03.2012 03.05.2015 0 0 1777 False&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;hässlich.txt &lt;/STRONG&gt;file 59 KB 03.05.2015 03.05.2015 0 1 777&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just can't get ndmpcopy to work with umlauts &lt;img id="smileymad" class="emoticon emoticon-smileymad" src="https://community.netapp.com/i/smilies/16x16_smiley-mad.png" alt="Smiley Mad" title="Smiley Mad" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My (root) volume language on the filer is de.UTF-8. My Powershell host is a German Windows 8.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can successfully run the ndmpcopy command (including umlauts in path names) from a PuTTY session to the same controller. But cannot using PoSh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I alread played with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$OutputEncoding =[System.Text.Encoding]::UTF8&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;$OutputEncoding =[System.Text.Encoding]::Default&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but the Invoke-Na* cmdlets seem to ignore it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's driving me crazy - I'm out of ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone point me to the right direction?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 15:13:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-or-Start-NaNdmpcopy-and-character-encoding/m-p/104043#M4287</guid>
      <dc:creator>mark_schuren</dc:creator>
      <dc:date>2015-05-05T15:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NaSsh or Start-NaNdmpcopy and character encoding</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-or-Start-NaNdmpcopy-and-character-encoding/m-p/118731#M4821</link>
      <description>&lt;P&gt;This was fixed in Netapp Powershell Toolkit 4.0.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However - same error now came back in toolkit 4.1.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 15:53:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NaSsh-or-Start-NaNdmpcopy-and-character-encoding/m-p/118731#M4821</guid>
      <dc:creator>mark_schuren</dc:creator>
      <dc:date>2016-04-26T15:53:26Z</dc:date>
    </item>
  </channel>
</rss>

