Skip to main content
Skip table of contents

API Management Backup and Restore

Data Export

On page Export/Import Data administrators can export all data from the API Management into an output file. The export functionality is not a perfect backup solution, but more of a migration tool. The export contains only configuration data.

Use the Export All button to start the data export:

Backuping API Management Data

As of PAS 21.1, this backup documentation is deprecated. Automatic backups are created for a Scheer PAS installation. Please contact the Scheer PAS support if you have further questions.

The steps below describe how to perform a simple API Management data backup on Linux. If you need a more sophisticated backup, consult the MySQL and Elasticsearch documentation.

Database Backup

The following steps describe how to take a data backup of API Management: MySQL and Elasticsearch.
This backup does not contain:

  • installation configurations (.env file)
  • certificates

  1. Backup your API Management data as described on 18189935, section Data Export.
  2. Shut down your API Management.
    To do this, run the following command:

    CODE
    docker-compose down

    The docker-compose.yml can be found in the following folder:

    • api-mgmt\single-host-setup\

    • api-mgmt\

  3. Backup the MySQL database and Elasticsearch. To  do this, use the following commands:

    CODE
    docker-compose run --no-deps --rm -v $(pwd):/backup --entrypoint 'tar cvf /backup/mysql_data.tar /var/lib/mysql' mysql
    CODE
    docker-compose run -uroot --no-deps --rm -v $(pwd):/backup --entrypoint 'tar cvf /backup/es_data.tar /usr/share/elasticsearch/data' elasticsearch

    Move the backup files to a safe location.

  4. Rename folder api-mgmt your API Management installation resides in to e.g. api-mgmt _backup. This backups your current installation that will otherwise be overwritten by the update.

Restoring API Management Data

Data Import

On page Export/Import Data administrators can import 18189935 from file into this installation. Click Select to search your computer for an import file and start the import with the button Upload File:

When importing an API Management backup, note the following:

  • Use a clean version of Elasticsearch.
  • The previously existing gateways still have to be available. The same applies to ports and URLs. Otherwise, these settings must be manually changed in the exported JSON file.

Restoring a Database Backup

  1. Remove the data containers and data volumes of you current installation.
    To do this, run the following command:

    CODE
    docker-compose down -v

    The rest of the API Management installation is kept.

  2. Load your API Management data backup.
    To do this, run the following commands:

    CODE
    docker-compose run -uroot --no-deps --rm -v $(pwd):/backup --entrypoint 'tar xvf /backup/es_data.tar -C /' elasticsearch
    docker-compose run -uroot --no-deps --rm -v $(pwd):/backup --entrypoint 'tar xvf /backup/mysql_data.tar -C /' mysql

Related Documentation:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.