Administration
...
Updating Passwork components
MongoDB

Windows Server

14min
  • If a replication suite is used, please contact Passwork technical support to update and save data correctly
  • If Passwork is installed on a virtual server, we recommend creating a snapshot before updating

Creating a backup

By default MongoDB administration utilities are not located in the $PATH environment variable, to use it you need to search for utilities using PowerShell.

Run PowerShell as Administrator:

  • Right-click on the Start icon in the lower left corner of the screen;
  • Select Windows PowerShell (Administrator) from the context menu.

Perform a search for administration utilities:

PowerShell


If MongoDB and the administration utilities were installed on a non-standard drive, you need to change the search path in the -Path parameter

The current working directory will be changed to the one in which the utilities are located. To test it, execute:

PowerShell


Create directory:

PowerShell


Create a backup:

PowerShell


The mongodump and mongorestore utilities are located in the same MongoDB 4.x installation directory.

Removing the older version

Stop the service:

PowerShell


Delete the database:

PowerShell


Delete the directory with the contents of the database:

PowerShell


Perform a search for MongoDB in the registry:

PowerShell


Delete an entry from the registry:

PowerShell


Installing MongoDB

Download MongoDB installer:

PowerShell


In case of an error, you can download the installer manually

Install MongoDB by default:

PowerShell


To install MongoDB on another drive, you need to add — "INSTALLLOCATION=A:\MongoDB"

Create a directory for the MongoDB administration utilities:

PowerShell


Download administration utilities:

PowerShell


In case of an error, you can download the installer manually

Extract the contents:

PowerShell


Perform a shell connection check:

PowerShell


Restoring the backup

If the connection to the shell is up, restore the databases from the backup:

PowerShell


And open Passwork to verify that everything was done correctly.