Administration
...
Updating Passwork components
MongoDB

Ubuntu

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.

The instruction uses switchable code blocks to separate the instructions depending on the operating system version.

Preparing and removing an outdated version

Creating a backup

Create a directory:

shell


Create a backup:

shell


Removing

Stop the service:

shell


Move the configuration file:

shell


Remove the database with configuration files:

shell


Delete directory with log files:

shell


Delete MongoDB data files:

shell


Remove deprecated repository for MongoDB 4.x:

shell


Update the list of available packages:

shell


Installing and restoring a backup

Installation

Download and add the MongoDB GPG key:

shell


Add MongoDB repository to the file:

Ubuntu 22.04
Ubuntu 20.04


Update the list of available packages:

shell


Install the database and administration utilities:

shell


Start the mongod.service:

shell


Enable autostart of the service:

shell


Perform a shell connection check:

shell


Restore backup

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

shell


If any parameter changes were made to the MongoDB configuration file (mongod.conf), you must replace the new file with the old one:

shell


Restart the mongod.service:

shell


Open Passwork to verify correct operation.

Updated 11 Oct 2024
Doc contributor
Did this page help you?