Standard installation
...
Linux
Passwork Migration
Old Docker migration to new
12min
These instructions are intended for a single Passwork installation and are not suitable for a fault-tolerant solution.
- Check the installed version of Passwork — cat /server/sites/prod/app/config/config.php | grep version. If version:
- Go to the Passwork directory and create a directory for the files — cd /server/docker-compose/ && mkdir old_docker
- Create a MongoDB backup:
- Local installation (MongoDB) without authorisation — docker-compose exec -T db sh -c 'mongodump --archive' > "./old_docker/my.dump"
- Local installation (MongoDB) with authorisation — docker-compose exec -T db sh -c 'mongodump --archive --authenticationDatabase admin --username=your-admin --password=your-password' > "./old_docker/my.dump"
- Installing (MongoDB) on a separate server — docker-compose exec -T db sh -c 'mongodump --host your-host:your-port --archive --authenticationDatabase admin --username=your-admin --password=your-password' > "./old_docker/my.dump"
- Create a copy of the configuration file config.ini — cp /server/sites/prod/app/config/config.ini ./old_docker/
- Create a copy of the licence key passwork-*.keys — cp /server/sites/prod/app/keys/*.keys ./old_docker/
If installing in Docker will use the same domain name and SSL certificate as the previous Passwork installation. SSL certificates must be copied if HTTPS connection is configured — cp -Rf /server/conf/ssl/ ./old_docker/
- Install Docker and Docker Compose
- Create and navigate to the directory where you plan to deploy the new Passwork Docker assembly.
- Stop the old (used) nginx container with the command — docker stop nginx && docker rm nginx
- Download the installation script — wget https://repos.passwork.pro/repository/docker/passwork_compose_install.sh
- Download the migration script — wget https://repos.passwork.pro/repository/docker/migrate.sh
- Assign execution rights — chmod +x ./*.sh
- Move the created ./old_docker directory to the directory where the new Docker build is planned to be deployed
- The directory should contain the following files:
- Configuration file — config.ini
- Licence key — passwork-*.keys
- MongoDB backup
- SSL certificates of Passwork website
- Run the script with the -md flag — sudo ./passwork_compose_install.sh -md
- The installation script will perform a basic installation of the latest version of Passwork available in your licence and automatically run the migration script.
- After the scripts are finished, check that the new installation is working properly and make adjustments if necessary — https://docs.passwork.pro/online-installation#cMZWh
- To add mail server or LDAPS protocol root certificates to trusted certificates, copy the .pem or .crt root certificates to the ./conf/custom_ca directory and restart the PHP container — docker compose restart passwork_php
- To change the SSL certificate used, copy the certificate/certificate chain to ./conf/ssl/fullchain.pem and the private key to ./conf/ssl/privkey.pem and restart the Nginx container — docker compose restart passwork_nginx
Issue. Error of rights to one or another base when trying to create a full backup:
Solution. Log in to the MongoDB management shell as the current administrator and add the role:
Updated 31 Oct 2024
Did this page help you?
TABLE OF CONTENTS