32.8.4 Copy DB

To copy the database from specified server to the current server, run the following commands:

  1. docker exec -ti aaf-aucore-1 bash

  2. /opt/penv/bin/au-replica copy-db

To copy the database from specific server to the current server, run the following commands:

  1. docker exec -ti aaf-aucore-1 bash

  2. SRC_PASSWORD=XXX au-replica copy-db [--host SRC_HOST]

where:

  • SRC_HOST is registrator by default.

  • SRC_PASSWORD is environment variable and by default reads the password from server table (where host=SRC_HOST).

You can fetch the local DB password using the following command:

docker exec aaf-aucore-1 cat /opt/AuCore/data/production.ini | grep replica.url

This command returns the following output:

replica.url = postgresql+psycopg2://root:Password1@127.0.0.1/aucore_prod

The text between colon (:) and at symbol (@) is the actual password.