How Do I Restore a SimpleRisk backup database?
This short guide will help you restore a MySQL backup of SimpleRisk’s database. Restoring a backup is a crucial step in maintaining the integrity of your data, especially after unexpected events such as data loss or corruption. This operation should take approximately 5-10 minutes, depending on the size of your database and the speed of your server. To successfully complete this process, you will need to use the root MySQL user, which has the necessary permissions to perform the restoration. It is important to ensure that you have a recent backup file available before proceeding, as this will allow you to recover your database to its previous state. Follow the instructions carefully to ensure a smooth and efficient restoration process.
To begin you will need to identify the root mysql user password. For users who manually installed SimpleRisk on their platform of choice they will be responsible for locating their MySQL root password, below I will provide locations for automated installs default password locations:
RHEL 8 / CentOS 7 - /root/passwords.txt
Ubuntu 18.04/20.04 - /root/passwords.txt
Docker - /passwords/pass_mysql_root.txt
Next we begin the restoration process. This guide will assume your simplerisk backup is stored in the /tmp directory. Now from terminal we use the following steps to restore the database:
Linux
1) mysql -u root -p (Login to the MySQL console using your root password)
2) DROP database `simplerisk`; (This will drop your current simplerisk database and delete it)
3) CREATE database `simplerisk`; (This creates the new database for us to import the data into)
4) quit (exit MySQL Console)
5) mysql -u root -p simplerisk < simpleriskbackup.sql
Summary
You have now restored your SimpleRisk backup and should be up and running again. If you have any trouble completing these steps or have any questions please contact us at support@simplerisk.com.