Note: Restoring the database backup is only supported to the same Evoko Home version on which the backup was originally taken. If you need to upgrade Evoko Home, please do so after the MongoDB backup has been fully restored. If you need access to older versions of Evoko Home no longer available on our website, please contact support and we will do our best to help.
This document contains instructions on how to backup and restore the Evoko Home database. It is strongly recommended to create a backup copy of the database before manually editing the database contents.
Contents
- Create a backup of the Evoko Home database on Windows
- Create a backup of the Evoko Home database on Linux
- Restore a backup to Evoko Home on Windows
- Restore a backup to Evoko Home on Linux
- Next steps
Create a backup of the Evoko Home database on Windows
- Start an elevated Command Prompt, for example by searching for cmd on the start menu, then right clicking and selecting Run as administrator.
- Change into the MongoDB bin folder. The location of this folder might vary, but the default location is
C:\Program Files\MongoDB\Server\4.2\bin\
.
We will use MongoDB 4.2 installed in the default folder throughout this guide, so please adjust the paths accordingly if you are using another MongoDB version or have MongoDB installed in a non-default location.
Example command:
cd "C:\Program Files\MongoDB\Server\4.2\bin"
- Start another elevated Command Prompt window and change into the same directory as before. To do this, repeat step 1 and 2.
- Go to Services and stop the ERM Service. If there is a MongoDB service, stop that too.
Downtime!
Stopping the ERM Service make all Lisos fail to connect to the booking system, which means- No booked meetings will be synced to the Liso devices
- No meetings can be booked on screen
- Switch to one of the Command Prompt windows you previously opened and start MongoDB by typing or pasting the following command:
mongod --dbpath ..\data
Troubleshooting If you are presented with a prompt after the step above, something went wrong and MongoDB could not be started. Please see the error messages in the command prompt window and either try to correct the issues yourself or copy them and contact us for assistance.Leave this Command Prompt window open. You can minimize it if you want to. - Switch to the other Command Prompt window and type or paste the following to perform a dump (backup) of the database:
mongodump --db evoko_db -u evoko_user -p evoko_pass
If you used a custom database name, replace evoko_db in the command above with your custom database name. The output should be similar to this screenshot:
If you still have the other Command Prompt window visible, you will see information scrolling by there as well.
Note: Your database backup is now stored in the dump subfolder. If you repeat the process, the dump files are overwritten so make sure to save them securely until you are certain they are no longer needed. - Close the Command Prompt window where you ran the mongodump command, then switch to the first Command Prompt window and exit mongod cleanly by pressing
ctrl-c
on the keyboard. You can then close that Command Prompt window too. After this you can start the ERM Service if you wish to minimize downtime for the Liso system.
Success! You now have a backup copy of your database.
Create a backup of the Evoko Home database on Linux
- Change into the correct directory:
cd ~/Evoko\ Home/
- Run the backup script:
sudo bash backupdb.sh
- The output will let you know where the backup is created. Copy or move this folder to a safe location as it is overwritten if you run the backup script again.
Success! You now have a backup copy of your database.
Restore a backup to Evoko Home on Windows
Steps 1-5 in the restore instructions are the same as in the backup instructions.
- Start an elevated Command Prompt, for example by searching for cmd on the start menu, then right clicking and selecting Run as administrator.
- Change into the MongoDB bin folder. The location of this folder might vary, but the default location is
C:\Program Files\MongoDB\Server\4.2\bin\
.
We will use MongoDB 4.2 installed in the default folder throughout this guide, so please adjust the paths accordingly if you are using another MongoDB version or have MongoDB installed in a non-default location.
Example command:
cd "C:\Program Files\MongoDB\Server\4.2\bin"
- Start another elevated Command Prompt window and change into the same directory as before. To do this, repeat step 1 and 2.
- Go to Services and stop the ERM Service.
Downtime!
Stopping the ERM Service make all Lisos fail to connect to the booking system, which means- No booked meetings will be synced to the Liso devices
- No meetings can be booked on screen
- Switch to one of the Command Prompt windows you previously opened and start MongoDB by typing or pasting the following command:
mongod --dbpath ..\data
Troubleshooting If you are presented with a prompt after the step above, something went wrong and MongoDB could not be started. Please see the error messages in the command prompt window and either try to correct the issues yourself or copy them and contact us for assistance.Leave this Command Prompt window open. You can minimize it if you want to. - Copy the backup folder named dump to the MongoDB bin folder. In this example the path to the dump folder containing all backup files should be
C:\Program Files\MongoDB\Server\4.2\bin\dump
- Switch to the second Command Prompt window and type or paste the following to drop (i.e. delete) the contents currently in the database and restore from the backup:
mongorestore --drop dump\
Important!The output should be similar to this:
This command replaces the data in the database with the data from your backup. If this is not what you want, do not run this command and contact us for assistance.
(truncated)
If you still have the other Command Prompt window visible, you will see information scrolling by there as well. - Close the Command Prompt window where you ran the mongodump command, then switch to the first Command Prompt window and exit mongod cleanly by pressing
ctrl-c
on the keyboard. You can then close that Command Prompt window too. After this you can start the ERM Service if you wish to minimize downtime for the Liso system.
Success! You now have restored the copy of your database.
Restore a backup to Evoko Home on Linux
- Change into the correct directory:
cd ~/Evoko\ Home/
- Run the restore script:
sudo bash restoredb.sh
- The output will ask whether you would like to remove the backup. Answer 1 to have the backup removed or 2 to keep it.
- Evoko Home and MongoDB restarts.
Next steps
- If you are using MongoDB version 3.2 and Evoko Home v2.2 or above, you must migrate your MongoDB environment to 3.4. Please see this article: Update MongoDB from 3.2 to 3.4.
- If you need to update Evoko Home, please see How do I update Evoko Home?