Skip to main content

The most recent patch for this version is 7.6.1.  Learn more  

Version: 7.6

Backup & restore on Docker environments

Follow the instructions below to backup and restore your Axiomatics Services Manager (ASM) Docker deployment.

Backup

  1. Stop all services except for the databases.

    docker stop docker-adm-1 docker-service-aggregator-1 docker-asm-1 docker-gateway-1 docker-keycloak-1 docker-pd-api-1 docker-pd-ui-1
  2. Enter the container.

    docker exec -it -u postgres docker-db-1 bash
  3. Dump the databases inside the container.

    cd /db_migration
    pg_dump asm > asm.sql
    pg_dump keycloak > keycloak.sql
    pg_dump domain_manager > domain_manager.sql
    pg_dump pd > pd.sql
    note

    Verify that the output files aren't empty and contain valid data.

  4. Exit the container.

    exit
  5. Copy the SQL files to the host.

    docker cp docker-db-1:/db_migration/asm.sql .
    docker cp docker-db-1:/db_migration/keycloak.sql .
    docker cp docker-db-1:/db_migration/domain_manager.sql .
    docker cp docker-db-1:/db_migration/pd.sql .
  6. Optionally, if you are using custom Attribute Connectors, back up the contents of the docker/asm.core/attribute.connectors/custom-attribute-connectors folder.

    note

    The older http-pip and parser-pip are also included in this directory. To keep using them, you should back them up along with the rest of the folder contents. However, you should consider switching to the new refactored HTTP Attribute Connector 5.3.0Opens in a new tab and Parser Attribute Connectors 1.0.1Opens in a new tab that are bundled with ASM 7.6.

Restore

  1. Stop all services except for the databases.

    docker stop docker-adm-1 docker-service-aggregator-1 docker-asm-1 docker-gateway-1 docker-keycloak-1 docker-pd-api-1 docker-pd-ui-1
  2. Copy the SQL files to the new database container.

    cp <path_to_file>/asm.sql <path_to_asm>/docker/postgres/db_migration/asm.sql
    cp <path_to_file>/keycloak.sql <path_to_asm>/docker/postgres/db_migration/keycloak.sql
    cp <path_to_file>/domain_manager.sql <path_to_asm>/docker/postgres/db_migration/domain_manager.sql
    cp <path_to_file>/pd.sql <path_to_asm>/docker/postgres/db_migration/pd.sql
  3. Enter the container.

    docker exec -it -u postgres docker-db-1 bash
  4. Drop the databases, create them again and run the SQL files.

    psql template1 -c 'drop database asm'
    psql template1 -c 'drop database keycloak'
    psql template1 -c 'drop database domain_manager'
    psql template1 -c 'drop database pd'
    psql template1 -c 'create database asm'
    psql template1 -c 'create database keycloak'
    psql template1 -c 'create database domain_manager'
    psql template1 -c 'create database pd'
    psql asm < db_migration/asm.sql
    psql keycloak < db_migration/keycloak.sql
    psql domain_manager < db_migration/domain_manager.sql
    psql pd < db_migration/pd.sql
  5. Exit the container.

    exit
  6. Start all the service's containers again.

    docker-compose -f docker-compose.yml -f docker-compose.dashboard.yml up --build