Skip to content

Commit

Permalink
Updated link and link of bioapi_db-1.2.0.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
Genarito authored Feb 25, 2024
1 parent 414f770 commit fd0911a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BioAPI uses three genomic databases for its operation. These databases must be l
To import all databases in MongoDB:
1. Download the "bioapi_db.gz" from **[here](https://drive.google.com/file/d/1LU8KwP1pBBF12H97AQkGrrUTSko7HvLQ/view?usp=sharing)** and move it a directory called `import_files`.
1. Download the "bioapi_db-1.2.0.gz" from **[here](https://drive.google.com/file/d/1wK8avSQmcoK47ttrZ8wqq3UVWgk5q4vE/view?usp=sharing)** and move it a directory called `import_files`.
2. Shutdown all the services running `docker compose down`
3. Edit the `docker-compose.dev.yml` file to include the downloaded file inside the container:
```yml
Expand All @@ -49,17 +49,17 @@ To import all databases in MongoDB:
- /path/to/import_files:/import_files
# ...
```
Where "/path/to/" is the absolute path of the "bioapi_db.gz" file downloaded on step 1. **Note:** in Windows It could happen that the file is not correctly mounted inside the container, that's why you need to move the file to a directory like `import_files`, and bind mount that folder instead of the file.
Where "/path/to/" is the absolute path of the "bioapi_db-1.2.0.gz" file downloaded on step 1. **Note:** in Windows It could happen that the file is not correctly mounted inside the container, that's why you need to move the file to a directory like `import_files`, and bind mount that folder instead of the file.

4. Start up the services again running `docker compose -f docker-compose.dev.yml up -d`
5. Go inside the container `docker container exec -it bio_api_mongo_db bash`
6. Use Mongorestore to import it into MongoDB:

```bash
mongorestore --username <user> --password <pass> --authenticationDatabase admin --gzip --archive=/import_files/bioapi_db.gz
mongorestore --username <user> --password <pass> --authenticationDatabase admin --gzip --archive=/import_files/bioapi_db-1.2.0.gz
```

Where *\<user\>*, *\<pass\>* are the preconfigured credentials to MongoDB in the `docker-compose.yml` file. *bioapi_db.gz* is the file downloaded in the previous step. **Keep in mind that this loading process will import approximately *47 GB* of information into MongoDB, so it may take a while**.
Where *\<user\>*, *\<pass\>* are the preconfigured credentials to MongoDB in the `docker-compose.yml` file. *bioapi_db-1.2.0.gz* is the file downloaded in the previous step. **Keep in mind that this loading process will import approximately *47 GB* of information into MongoDB, so it may take a while**.

7. Stop services with the command `docker compose -f docker-compose.dev.yml down`
8. Rollup the changes in `docker-compose.dev.yml` file to remove the backup file from the `volumes` section.
Expand Down Expand Up @@ -156,9 +156,9 @@ Finally, if you want to create a new image of MongoDB data, you can follow the f
5. Use mongodump to export the data to a file:
```bash
mongodump --username <user> --password <pass> --authenticationDatabase admin --host localhost --port 27017 --gzip --db bio_api --archive=/export_data/bioapi_db.gz
mongodump --username <user> --password <pass> --authenticationDatabase admin --host localhost --port 27017 --gzip --db bio_api --archive=/export_data/bioapi_db-1.2.0.gz
```
**NOTE**: The process can take a few hours
The new image can be found in *"/path/in/your/computer/bioapi_db.gz"*
The new image can be found in *"/path/in/your/computer/bioapi_db-1.2.0.gz"*

0 comments on commit fd0911a

Please sign in to comment.