Getting Data in and out #
In Planetary Quantum, your data is in Docker volumes. How do you get it in there, and how do you get it out of there?
Upload #
The easiest way to get some initial set of data into a volume is to use the Quantum Console:
- In the list of volumes, click “browse” on the volume you want to upload data into:
- Click the upload button to upload your files into the volume:
General Strategies #
- For databases, upload a database dump into a volume attached to the database. Then, navigate to the database container in the Quantum Console, open a shell into it, and use the database-specific scripts to import the data.
- For miscellaneous files, e.g. when hosting a static website, you should
probably bake the data into the image at
docker build
time. - In some cases it might be easier to upload a single
tar.gz
file into the volume, and extract it later, using a shell on the container.
Download #
Single files can be downloaded via the volume browser mentioned above (“volumes” => “browse”).
For large collections of files, use a container to create an archive and
then download that archive via the volume browser (for example, something like tar -czvf /myvolume/archive.tar.gz /myvolume/directory/with/data
).
This is too fiddly #
In some cases it might be easier or more convenient to start a small SFTP stack (or similar) - with the necessary ports exposed, and the volume(s) in question mounted - and to upload or download data in that way. There are a range of easy to use images on Docker Hub, depending on your file transfer protocol of choice.