<p>I need to copy dump data from pod to local. Below the commands I am trying but I am getting error: <code>unexpected EOF</code></p>
<pre><code>kubectl cp device-database-79fc964c8-q7ncc:tmp /Users/raja
error: unexpected EOF

or

kubectl cp device-database-79fc964c8-q7ncc:tmp/plsql_data/prod.dump /Users/raja/prod.dump
error: unexpected EOF


</code></pre>
<p>kubectl version</p>
<pre><code>kubectl version --client
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.0&quot;, GitCommit:&quot;cb303e613a121a29364f75cc67d3d580833a7479&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-04-08T16:31:21Z&quot;, GoVersion:&quot;go1.16.1&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;}

</code></pre>
<p>Can anyone help how to fix this issue?</p>
<p>Thanks</p>

User1984
<p>For newer versions of kubectl, adding a retries=-1 flag may resolve the issue:</p>
<pre><code>kubectl cp --retries=-1 pod-www-xxx-yyy-zzz:/path/to/remote/dir ~/local/dir 
</code></pre>
