To restore system from backup in Foresight Mobile Platform 22.04 or later:
Restore a virtual machine from backup if the system failure was caused the virtual machine itself.
Execute one of the operations:
Start Docker containers if they were stopped:
% docker-compose -f docker-compose.standalone.yml up
Reinstall Foresight Mobile Platform if required.
Create a script and place it on the computer with running mobile platform server.
Move the folder standalone_backup_<backup creation date and time> to the computer with running mobile platform server.
Deny access of user to mobile platform server.
Replace the .env configuration file with its backup, if Foresight Mobile Platform was reinstalled at Step 2.
Start the script:
If the folder standalone_backup_<backup creation date and time> is located together with the script:
bash <script name>.sh
NOTE. If there are several folders standalone_backup_<backup creation date and time> together with the script, specify name of the required folder as the first argument.
If the folder standalone_backup_<backup creation date and time> and the script are located on different levels:
bash <script name>.sh <path to the folder with backup>
Check system performance and volume of restored data:
Check cache data volume. If the data volume is not full, delete cache and add it again in the Cache Control subsection.
Reset JWT expiration time for API users and administrators. To do this, change values of the parameters: Expiration Time of JWT Token for API Users, Expiration Time of JWT Token for Administrators, Expiration Time of refresh JWT for API Users and Administrators in the Security subsection.
Add accounts of API users if they were added after creating a backup.
Allow access of users to mobile platform server.
Template of the script for restoring system from 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, select one of the methods:
Roll back the working cluster to original state:
Create a script and place it on the computer that controls the cluster.
Deny access of users to the cluster.
Start the script:
bash <script name>.sh
Check cluster work.
Allow access of users to the cluster.
Deploy again the cluster based on OKD/OCP:
Places copies of configuration files on the computer, which controls the cluster.
Make sure that users do not work with the cluster and backups were created in the version of Foresight Mobile Platform corresponding to the installed one.
Create a script and place it on the computer that controls the cluster.
Start the script:
bash <script name>.sh
NOTE. At the level of the script the system checks if there is the cluster_backup_<backup creation date and time> folder with saved backups. If there are several such folders, specify name of the required folder as the first argument.
Check cluster work.
Allow access of users to the cluster.
Template of the script for restoring system from backup (version 21.04)
Template for restoring system from backup (version 20.10 or earlier)
After executing the operations the system is restored from backup.
See also:
Creating a Backup and Restoring System | Creating a System Backup in Foresight Mobile Platform 22.04 or Earlier