Configuration
This section describes Apinizer backup tasks. It is recommended that you periodically create a backup of Apinizer components, ie configuration and data, and ensure that recovery is performed in case of system failure. Backup and restore procedures allow you to restore the entire system (including all components) without affecting other parts of the system.
Apinizer keeps all configurations in MongoDB database. All other components do not need to be backed up as they run on kubernetes architecture. At any time, you can configure Apinizer's components by pulling them from the Image Repository.
In an on-premise distribution of Apinizer, you only need to back up the configuration database (MongoDB):
Apinizer works with Replicate Set MongoDB database. This should be taken into account when making a backup over the MongoDB server.
Make a Backup
A. From the Command Line
mongodump --host=yourMongodbIp --port=yourPort --authenticationDatabase admin --username apinizer --password Apinizer.1 --db apinizerdb --gzip --archive=/tmp/dump/apinizer-backup-2020-12-31-01.archive
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
For detailed usage, MongoDB documents can be viewed at this address.
B. Via Apinizer
Instant backup can be made with the Start Backup button, or a recurring backup can be scheduled with the Create Job Schedule button.
This operation completely backs up MongoDB.
The picture below shows the MongoDB Backup settings:
The MongoDB Backup settings fields are shown in the table below.
Field | Description |
---|---|
Active | It must be activated in order to make a backup. |
IP Address | The IP Address of the server where the MongoDB database is running. |
SSH Port | The SSH Port of the server where the MongoDB database is running. |
Username | The SSH username of the server where the MongoDB database is running. |
Password | The SSH password of the server where the MongoDB database is running. |
MongoDB Port | The port on which the MongoDB database is running. |
MongoDB Username | The username of the MongoDB database. |
MongoDB Password | The password for the MongoDB database. |
Database | Database name where Apinizer configurations on MongoDB are kept. Default value: apinizerdb. |
Backup Directory | Directory where Apinizer backups will be taken. Make sure that the SSH user has permission to write to the directory given here. |
Backup Format | It is the information in which format the backups will be kept. It cannot be changed. Its default value is apinizer-backup-yyyy-MM-dd-HH.archive. |
Action |
|
Tables to exclude from backup | Collections selected from the list of all MongoDb collections owned by Apinizer are not backed up. |