How to Migrate Your SimpleRisk Instance
This guide provides step-by-step instructions for transferring a SimpleRisk instance to a different machine or virtual machine (VM). While the process is generally straightforward, we strongly recommend that you create a complete backup of your SimpleRisk database at a minimum, and ideally, also back up your entire SimpleRisk directory. If you need assistance with backing up your database, detailed guidance is available below. To successfully carry out this process, you will need access to your MySQL root user account. If you encounter any difficulties or have questions along the way, please refer to the links provided for additional support. Should you still need assistance, feel free to reach out to us at support@simplerisk.com, and we will be more than happy to help you in any way we can.
How to Backup your Simplerisk Instance
If you plan to transfer the SimpleRisk directory from your old server to the new one, you can keep your extras enabled. However, if you choose not to do this, it may lead to data loss specifically for the assessment extra and ComplianceForge SCF. If you are unable to leave the extras on, you must deactivate all extras before moving the database. To do this, navigate to the “Configure” menu on the left, then select the “Extras” menu. By clicking “Yes” for each extra, you will be directed to a menu that allows you to deactivate that particular extra. After deactivating all extras, you can create the backup that will be transferred to your new server. (Please note that any extras that require additional setup, such as the Authentication Extra, will retain their settings as these are stored in the database even after deactivation.)
Now that you have backed up both the database and the SimpleRisk directory, you can proceed to install a LAMP server on your destination machine. For installation guidance, you can refer to the link provided in the introduction. Follow the installation guide until you reach the step that instructs you to move the SimpleRisk directory into your www directory.
At this stage, you will need to transfer the SimpleRisk directory from the source machine to the “/var/www/” directory, or its equivalent on your system. Once the directory is successfully placed, the next step is to restore the SimpleRisk database backup that you should have created in the earlier steps. To do this, navigate to the database backup directory using the command line interface (CLI) and execute the appropriate command:
“mysql -u root -p < simplerisk.sql”
This will insert the database into your new MySQL instance.
If the system receiving the database was setup using the script please skip the following and at this point you should now have a completed the migration. If you are setting up the system receiving the database manually then please continue on.
You will now need to create the SimpleRisk user. Before you begin you will need to travel to your SimpleRisk directory and find the simplerisk/includes/config.php and find the line that states something like:
('DB_PASSWORD', 'XXXXXXXXXXXXXXXX')
Copy this DB_Password and save it for your next step.
To create the SimpleRisk user login to your MySQL console using:
“mysql -u root -p”
Once logged in we will need to use the following commands (note: configpassword refers to the DB_Password from the previous step):
CREATE USER ‘simplerisk’@’localhost’ IDENTIFIED BY ‘configpassword’;
GRANT SELECT,INSERT,UPDATE,ALTER,DELETE,CREATE,DROP ON 'simplerisk.*' TO ‘simplerisk’@’localhost';
UPDATE db SET References_priv='Y',Index_priv='Y' WHERE db='simplerisk';
Once you have completed this step you should now be able to access your SimpleRisk instance and the migration should be complete. If you found anything in this guide to not be clear or require any further assistance please contact us at support@simplerisk.com