I'm trying to work out how to transfer a file from ceph block storage, e.g. a database backup.
I've followed the example here: https://github.com/rook/rook/blob/master/Documentation/ceph-block.md so that I have Wordpress and mysql working on rook-ceph-block.
How can I then transfer a file from the running pods. For example if I wanted to download a database backup onto another host?
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.
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).
However, you are probably doing the wrong thing. The right solution is to configure rook to do this for you using a volume snapshot.