1.1.D Create a backup of BOA DDBB - Daniel-Brosnan-Blazquez/vboa GitHub Wiki
Introduction
This procedure covers the action to create a backup of BOA DDBB.
Pre-conditions
- An available BOA environment is ready to use.
Procedure
- Access to the BOA environment.
- If containers are not running, start containers (as root):
Note: the names of the containers may differ between environments (check with docker container list).
docker start boa_app_dev boa_database_dev
- Connect to database:
docker exec -it -u postgres boa_database_dev /bin/bash
- Dump DDBBs to a file:
pg_dumpall -h boa_database_dev -U postgres > /tmp/boa.sql
- Exit from previous connection and upload DDBBs backup to the app container
docker cp boa_database_dev:/tmp/boa.sql /tmp/boa.sql
docker cp /tmp/boa.sql boa_app_dev:/tmp/boa.sql
- Connect to app:
docker exec -it -u boa boa_app_dev /bin/bash
- Create backup:
cd /tmp
tar czvf /tmp/boa.tgz /minarc_root /rboa_archive boa.sql
- Exit from previous connection and export the BOA backup using the following command:
docker cp boa_app_dev:/tmp/boa.tgz /tmp/
- Clean-up containers:
- Connect to database and clean-up DDBBs backup:
docker exec -it -u postgres boa_database_dev /bin/bash
rm /tmp/boa.sql
- Exit from previous connection, connect to app and clean-up DDBBs backup:
docker exec -it -u root boa_app_dev /bin/bash
rm /tmp/boa.tgz
rm /tmp/boa.sql