To create a backup in Foresight Mobile Platform 22.04 or later:
Create a script and place it in the folder with the docker-compose.standalone.yml file.
Make sure that data source caches are not being updated or deleted, and user synchronization is not running from LDAP directory. To view background task log, use the Background Tasks subsection or the tasks API method. If background tasks are being executed, data integrity may be corrupted on creating a backup.
Start the script in its folder:
bash <script name>.sh
After this, the standalone_backup_<date and time of backup creation> folder is created in the folder with the script, containing backup files of PostgreSQL databases, the MinIO file storage, and Elasticsearch technical logs.
Move the standalone_backup_<backup creation date and time> folder to the to the computer used for storing backups.
Create a copy of *.env configuration file if it has not been changed, and place it to the computer next to the standalone_backup_<backup creation date and time> folder.
Template of the script for creating a backup (version 22.04, 21.10)
If on installing Foresight Mobile Platform 21.04 or earlier a fault-tolerant cluster based on OKD/OCP is deployed:
Create a script and place it on the computer that controls the cluster.
Make sure that data source caches are not being updated or deleted, and user synchronization is not running from LDAP directory. To view background tasks log, use the Background Tasks subsection or the tasks API method. If background tasks are being executed, data integrity may be corrupted on creating a backup.
Execute authentication in the system in Foresight Mobile Platform 21.04:
oc login -u <User name> -p <password> <host>
Start the script:
bash <script name>.sh
If Foresight Mobile Platform 21.04 is used, the cluster_backup_<backup creation date and time> folder for storing all backups will be created together with the script.
Insert the backup of changed configuration files in the cluster.
Template of the script for creating a backup (version 21.04)
Template for creating a backup (version 20.10 or earlier)
After executing the operations the following backups are created: PostgreSQL databases, the MinIO file storage and Elasticsearch technical logs, .env configuration file.
See also:
Creating a Backup and Restoring System | Restoring Elasticsearch Logs from Backup in Foresight Mobile Platform 22.04