Publication dateMar 9, 2022
Confidentiality public Public
Typing name : TASK.gws_biota.BiotaDbZipper Brick : gws_biota Export the Biota MariaDB data folder as a zip file
Biota DB Zipper
A task that zips the local Biota MariaDB data folder so it can be uploaded
to the cloud S3 bucket to declare a new version of the Biota database.
Overview
The Biota database is hosted in a MariaDB Docker container whose data
directory (/var/lib/mysql) is mounted on the host through the
LAB_VOLUME_HOST_NO_BACKUP volume defined in
gws_biota/db/docker-compose.yml. This task locates the host directory
backing that volume via DockerService.get_volume_local_path (with
include_in_backup=False) and creates a zip archive of its content.
This replaces the manual prepare_db.sh script previously executed inside
the database Docker container.
Input/Output
- Inputs: None
- Output:
File resource pointing to the generated zip archive
Notes
- The Biota DB Docker compose must have been registered (e.g. via
BiotaDbDownloader) so that the host volume exists.
- For consistency, it is recommended to stop the database container before
running this task to avoid zipping data while MariaDB is writing to disk.
logout
Output
Biota DB zip
Zip archive of the Biota MariaDB data folder
Technical bricks to reuse or customize Have you developed a brick?
Share it to accelerate projects for the entire community.