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

  1. An available BOA environment is ready to use.

Procedure

  1. Access to the BOA environment.
  2. 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
  1. Connect to database:
docker exec -it -u postgres boa_database_dev /bin/bash
  1. Dump DDBBs to a file:
pg_dumpall -h boa_database_dev -U postgres > /tmp/boa.sql
  1. 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
  1. Connect to app:
docker exec -it -u boa boa_app_dev /bin/bash
  1. Create backup:
cd /tmp
tar czvf /tmp/boa.tgz /minarc_root /rboa_archive boa.sql
  1. Exit from previous connection and export the BOA backup using the following command:
docker cp boa_app_dev:/tmp/boa.tgz /tmp/
  1. Clean-up containers:
    1. Connect to database and clean-up DDBBs backup:
docker exec -it -u postgres boa_database_dev /bin/bash
rm /tmp/boa.sql
  1. 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