<p>I know this question asked before and I checked them but still fails.</p>
<p>Pod name : postgresl-7c8b9-qs67z</p>
<p>File in the pod : /home/backup/db</p>
<p>So I want to try to copy &quot;db&quot; file to my local and I tried to commands below, but all of them giving the same error.</p>
<pre><code> kubectl cp default/postgresl-7c8b9-qs67z:/home/backup/db C:\Users\myuser\Desktop\mydb1.dmp

 kubectl cp default/postgresl-7c8b9-qs67z:/home/backup/ C:\Users\myuser\Desktop\

 kubectl cp postgresl-7c8b9-qs67z:/home/backup/db C:\Users\myuser\Desktop\mydb1.dmp
</code></pre>
<p>And the error is :</p>
<pre><code>error: one of src or dest must be a local file specification
</code></pre>
<p>How can I do that? Thanks!</p>

yatta
<p>Currently there seems to be a <a href="https://github.com/kubernetes/kubernetes/issues/77310#issuecomment-600571650" rel="noreferrer">bug</a> in kubectl where <code>C:</code> is treaten as the pod name.</p>
<p>Just use a relative path for your local file. E.g:</p>
<pre><code>kubectl cp default/postgresl-7c8b9-qs67z:/home/backup/db ./Desktop/mydb1.dmp
</code></pre>
<p><strong>additional hint:</strong></p>
<p>If you receive a <code>tar: Removing leading '/' from member names</code>, check if the file was downloaded anyhow.</p>
