Administration
...
Updating Passwork components
MongoDB

Windows Server

15min

Note to self:

  • If a replication suite is used, please contact Passwork technical support for correct updating and saving of data;
  • If Passwork is installed on a virtual server, we also recommend creating a virtual snapshot of the operating system state before performing the upgrade.

Preparing and removing an outdated version

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.

Open 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

Once executed, the current working directory will be changed to the one in which the utilities are located, to test 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

Stop the service:

PowerShell


Delete 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 and restoring a backup

Installation

Download MongoDB installer:

PowerShell


In case of an error, you can download the installer manually — https://repos.passwork.pro/repository/windows_packages/mongodb_database_latest.msi

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 — https://repos.passwork.pro/repository/windows_packages/database_tools_latest.zip

Unzip the content:

PowerShell


Perform a shell connection check:

PowerShell


Restore backup

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

PowerShell


Open Passwork to verify correct operation.