Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jan 31, 2025 4:50:27 AM
Jan 31, 2025 4:50:27 AM
This article documents the steps to backup and restore a Qlik Alerting instance.
If any Command Line tool is open while installing MongoDB tools, you will need to restart the tool.
cd "C:\Program Files\MongoDB\Server\<VERSION>\bin"
If you are using a newer version of MongoDB, or it is located in a different location such as a D:\ drive, then please adjust this accordingly.
mongodump --db=qlikalerting --out="Backup Name"This will create a new folder in the C:\Program Files\MongoDB\Server\<VERSION>\bin folder called "Backup Name" and will export all of the data from the database into JSON format files.
Use the following code, with adjustments made where needed for your environment.
off
setlocal
rem Get the current date and time for versioning
for /f "tokens=1-3 delims=/ " %%a in ('date /t') do set dt=%%c-%%a-%%b
for /f "tokens=1-2 delims=: " %%a in ('time /t') do set tm=%%a-%%b
rem Combine date and time for the backup name
set BackupName=Backup_%dt%_%tm%
cd "C:\Program Files\MongoDB\Server\4.4\bin"
mongodump --db=qlikalerting --out="%BackupName%"
pause
An example of the output folder name will be: Backup_21-Mon-10_09-51
Make sure to update the MongoDB version as needed. In this example script, the version is '4.4'.
The information in this article is provided as-is and is to be used at your own discretion. Depending on the tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
cd "C:\Program Files\MongoDB\Server\<VERSION>\bin"
If you are using a newer version of MongoDB, or it is located in a different location such as a D:\ drive, then please adjust this accordingly.
mongorestore "D:\backups\Backup Name"
You must provide the path to the qlikalerting folder, not the path where the .json and .bson files are located. Here, qlikalerting is the backup folder name.
Example of a wrong path with the resulting error:
Example with the correct path and successful message:
Based on the above example screenshot, the correct path would be:
>mongorestore "C:\backups"