When running a self-hosted/on-premises installation, you will certainly want to run periodic backups of all your data.
In this article, we will provide you the scripts to perform a data dump of API Fortress. You will then need to wire them up in your scheduled operations system, such as
We will assume you have a running API Fortress installation, ability to
sudo to root privileges and a general idea of how Docker works.
In the host server, create a directory that will host your backup. In this example, it's
/var/local/backupsbut it can be anything. Make sure the directory has read/write permissions docker can use,
Run (change the directory according to your needs):
- Run (change the directory according to your needs):
- Access the
/var/local/backupsdirectory. You will find both an "apipulse" directory and a "postgres.sql" file. This is all your backup. You can now zip it and copy it wherever your backup procedures require. At this point we suggest you to clear the directory used for backup to have it empty for the next backup iteration.
- in the
core/directory, stop all services by issuing:
- Remove all data files from your persistent volume on the host machine.
This will erase all your current data. Make sure that the backup you are going to restore is available. If unsure, just MOVE the current data to another location.
- Activate MongoDB and PostgreSQL by issuing:
- We will assume your backup is located in
/var/local/backups. Run the following commands:
Verify that files are now present in the persistent volume location of your host machine,
You can now start the platform by running the