Cross-platform migration to Passwork 7
If the current server runs a legacy OS without PHP 8.3 support, a full Passwork update on that OS is not possible. Instead of moving the entire old installation, we recommend a cross-platform migration:
- On the new OS, perform a manual installation of Passwork 7.
- Data is transferred from the server where Passwork 6.5 remains.
- Passwork 7 connects to MongoDB on the legacy OS, reads the database objects, and updates them into a new local database on the current OS.
This guide is intended for a manual installation of Passwork.
Actions on the current OS with Passwork
Update and initial migration
- Update Passwork to version 6.5.
- Perform the initial data migration.
Open access to the MongoDB database
Edit the MongoDB configuration file /etc/mongod.conf and change bindIp from 127.0.0.1 to 0.0.0.0:
- shell
net:
bindIp: 0.0.0.0
Restart the MongoDB service:
- shell
systemctl restart mongod.service
Generate configuration files for Passwork 7
Create a temporary directory and copy the Passwork configuration file:
- shell
mkdir /tmp/pwk_migrate
cp /var/www/app/config/config.ini /tmp/pwk_migrate
Download the conversion script, set permissions, and run it:
- shell
cd /tmp/pwk_migrate/
wget https://repos.passwork.pro/repository/linux/scripts/config_convert.sh
chmod +x config_convert.sh
./config_convert.sh --input ./config.ini --output ./
After it finishes, the directory contains two configuration files:
config.envencryption_key
Confirm the migration on the Customer Portal
Confirm the data migration on the Passwork Customer Portal. Migration confirmation.
Actions on the new OS
Install Passwork 7
Perform a manual installation of Passwork (the latest available version).
After installing Passwork on the new OS, do not open the web interface. Otherwise it will be impossible to complete the Passwork migration correctly.
Transfer and configure the configuration files
- Copy the
config.envandencryption_keyfiles from/tmp/pwk_migrate/on the legacy OS to/var/www/init/on the new OS. - In
/var/www/init/config.env, set the MongoDB address of the legacy OS inMIGRATION_DATABASE_URL, and keepMONGODB_URLlocal:
- DEB
MONGODB_URL=mongodb://127.0.0.1:27017
MIGRATION_DATABASE_URL=mongodb://192.168.1.100:27017
Replace 192.168.1.100 with the IP or hostname of the server with the legacy OS. For the local database on the new OS, mongodb://127.0.0.1:27017 or mongodb://localhost:27017 are valid.
- Set the owner of the files in
/var/www/init/to the web server user:
- DEB
- RPM
chown www-data:www-data /var/www/init/*
chown apache:apache /var/www/init/*
Start the database objects migration
Start transferring objects from MongoDB on the legacy OS to the local MongoDB on the new OS:
- DEB
- RPM
sudo -u www-data bash -c 'cd /var/www && yes | php -d memory_limit=-1 ./bin/console database:v6:migration'
sudo -u apache bash -c 'cd /var/www && yes | php -d memory_limit=-1 ./bin/console database:v6:migration'
For details, see Migration of Passwork database objects.
Completing the migration with client-side encryption
If Passwork uses client-side encryption, complete the final stage — Data migration in the Passwork web interface.
Post-migration actions
After the migration is finished, follow the post-migration actions.