<p>I'm trying to work out how to transfer a file from ceph block storage, e.g. a database backup.</p>
<p>I've followed the example here:  <a href="https://github.com/rook/rook/blob/master/Documentation/ceph-block.md" rel="nofollow noreferrer">https://github.com/rook/rook/blob/master/Documentation/ceph-block.md</a> so that I have Wordpress and mysql working on <code>rook-ceph-block</code>.</p>
<p>How can I then transfer a file from the running pods. For example if I wanted to download a database backup onto another host?</p>

colebod209
<p>There are a number of approaches that could possibly work. If you know which specific container has the file then it's always possible to configure a node-port, ssh into the container with the file, install and run sshd, then use scp from the target machine using the node-port you allocated.</p>
<p>Another approach would be to create a simple HTTP server in a new pod that mounts the same filesystem. This could expose the file with an HTTP get command. You could do this quite easily with nodejs, express, and fs in a handful of lines of code. This is better than the first solution because you don't have to know which container has the file (something that can be challenging to discover).</p>
<p>However, you are probably doing the wrong thing. The right solution is to configure rook to do this for you using a <a href="https://kubernetes.io/docs/concepts/storage/volume-snapshots/" rel="nofollow noreferrer">volume snapshot</a>.</p>
