This section explains how to back up Apinizer configuration data. Because Apinizer stores all its configurations in the MongoDB database, regular database backups are necessary. These backups allow you to restore all configurations in the event of system failure or data loss.

Apinizer works with Replicate Set MongoDB database. This should be taken into account when making a backup over the MongoDB server.

Make a Backup

mongodump --host=<MONGO_IP> --port=<MONGO_PORT> --authenticationDatabase admin --username apinizer --password <MONGO_PASSWORD> --db apinizerdb --gzip --archive=/tmp/dump/apinizer-backup--YYYY-MM-DD-vX.Y.Z.archive
POWERSHELL

It is recommended to add the backup date and Apinizer version information to the end of the backup file name.
This:

  • Easily identifies which backup belongs to which system version.
  • Version incompatibilities are prevented during restore operations.
  • Easier management of archived backups.


If you don't want to include parts that may take up a lot of space, such as application logs or audit logs, they can be separated with the command: "–excludeCollection"

 --excludeCollection apinizer_log --excludeCollection audit_event

However, this process is not recommended as it will result in data redundancy.

For detailed usage, MongoDB documents can be viewed at this address.