Administration
...
Updating Passwork components
MongoDB

Alma/Rocky/CentOS

12min
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 this page uses switchable code blocks to provide instructions for different operating systems creating a backup create a directory shell mkdir /backup create a backup shell mongodump out /backup/mongo $(date +\\%y \\%m \\%d \\%h \\%m \\%s) removing the older version stop the service shell systemctl stop mongod service move the configuration file shell mv /etc/mongod conf / remove the database with configuration files shell yum erase mongodb org y delete directory with log files shell rm r /var/log/mongodb delete mongodb data files shell rm r /var/lib/mongo remove deprecated repository for mongodb 4 x shell rm f /etc/yum repos d/mongodb org 4 x repo installing mongodb create a file to add the mongodb repository to the yum package management system shell nano /etc/yum repos d/mongodb org 6 0 repo place the following contents in the file os 8 \[mongodb org 6 0] name=mongodb repository baseurl=https //repo mongodb org/yum/redhat/8/mongodb org/6 0/x86 64/ gpgcheck=1 enabled=1 gpgkey=https //pgp mongodb com/server 6 0 asc os 9 \[mongodb org 6 0] name=mongodb repository baseurl=https //repo mongodb org/yum/redhat/9/mongodb org/6 0/x86 64/ gpgcheck=1 enabled=1 gpgkey=https //pgp mongodb com/server 6 0 asc install the database and administration utilities shell yum install mongodb org y start the mongod service shell systemctl start mongod service enable autostart of the service shell systemctl enable mongod service perform a shell connection check shell mongosh mongodb //localhost 27017 restoring the backup if the connection to the shell is up, restore the databases from the backup shell mongorestore drop /backup/mongo xxxx xx xx xx xx xx if any parameter changes were made to the mongodb configuration file ( mongod conf ), you must replace the new file with the old one shell cp /mongod conf /etc/ restart the mongod service shell systemctl restart mongod service and open passwork to verify that everything was done correctly