Migration to Passwork 7

Migration of Passwork database objects

10min
skip this step if the standard installation (docker or powershell module) of passwork is used forming files for passwork version 7 after upgrading passwork to version 7, the following files need to be created and populated /init/config env /init/encryption key / — root location of the passwork windows server — c \inetpub\wwwroot\passwork\ linux — /var/www/ in the process of performing a passwork upgrade to version 7, a copy of the configuration file ( config ini ) is created in the location windows server — c \inetpub\wwwroot\config ini linux — /var/config ini automated creation and filling configuration files of passwork linux get a script to automatically generate files wget wget https //repos passwork pro/repository/linux/scripts/config convert sh curl curl o https //repos passwork pro/repository/linux/scripts/config convert sh grant execution rights to the script shell chmod +x /config convert sh ensure the following before running the script if passwork is installed in the default location /var/www/ and the configuration file config ini is located in the expected directory /var/config ini , the script can be run without specifying any arguments sudo /config convert sh if passwork is installed in a non standard location (other than /var/www/ ), for example, /var/www/passwork/ , the output or o argument must be used to specify the path to the init directory containing the configuration files example sudo /config convert sh output /var/www/passwork/init if the passwork configuration file config ini is located in a non default location (other than /var/config ini ), for example, /opt/config ini , the input or i argument must be used to specify the file path example sudo /config convert sh input /opt/config ini the script converts passwork config ini to config env and encryption key , checking their validity assign the web server user as the owner of the generated files deb chown www data\ www data /var/www/init/ rpm chown apache\ apache /var/www/init/ windows server get a script to automatically generate files powershell (new object system net webclient) downloadfile("https //repos passwork pro/repository/powershell/config convert ps1", "$pwd\config convert ps1") ensure the following before running the script if passwork is installed in the default location c \inetpub\wwwroot\passwork and the configuration file config ini is located in the expected directory c \inetpub\wwwroot\config ini , the script can be run without specifying any arguments \config convert ps1 if passwork is installed in a non standard location (other than c \inetpub\wwwroot\passwork ), for example, c \inetpub\wwwroot , the outputdirectory argument must be used to specify the path to the init directory containing the configuration files example \config convert ps1 outputdirectory "c \inetpub\wwwroot\init" if the passwork configuration file config ini is located in a non default location (other than c \inetpub\wwwroot\config ini ), for example, c \inetpub\config ini , the inputfile argument must be used to specify the file path example \config convert ps1 inputfile "c \inetpub\config ini" the script converts passwork config ini to config env and encryption key , checking their validity if errors occur during automatic creation and filling, you can create and fill the files with values manually manual creation and filling of passwork configuration files creating and populating the config env configuration file create a passwork configuration file linux touch /var/www/init/config env powershell new item itemtype file path "c \inetpub\wwwroot\passwork\init\config env" force in the file created, you must specify the following lines config env app url= mongodb url= mongodb db= mongodb username= mongodb password= migration database url= migration database db= migration database username= migration database password= mapping and filling parameters from config ini to config env app url — value of domain parameter in config ini mongodb url — value of connectionstring parameter in config ini mongodb db — specify a new passwork database name pw migration will create, migrate, modify and update the data of all objects that are located in the legacy passwork database; if mongodb authorization is not configured, you should leave the mongodb username , mongodb password , migration database username and migration database password parameters empty mongodb username — value of the username parameter in config ini mongodb password — value of password parameter in config ini migration database url — value of connectionstring parameter in config ini migration database db — value of dbname parameter in config ini migration database username — value of username parameter in config ini migration database password — value of password parameter in config ini if the algorithm parameter is specified in config ini , perform this step; if no parameter is specified, skip it encryption cipher — value of the algorithm parameter in config ini if the disableclientside parameter is specified in config ini , perform this step; if no parameter is specified, skip it is client side encryption enabled=1 example of a completed config env configuration file config env app url=https //passwork local mongodb url=mongodb //localhost 27017 mongodb db=pw mongodb username= mongodb password= migration database url=mongodb //localhost 27017 migration database db=pwbox migration database username= migration database password= creating and filling the encryption key file create an encryption key file linux touch /var/www/init/encryption key powershell new item itemtype file path "c \inetpub\wwwroot\passwork\init\encryption key" force in the created file, you must specify the secret value from config ini encryption key base64\ fin2gvyi7v2x4bxg3bfrmx1db/seqxibwooysqckjby= passwork database migration description the migration is designed to migrate all data from the legacy passwork database to the new one in the course of migration will be performed creation of new objects according to the current data structure migration of existing data with preserving its integrity; updating and optimization of all passwork database objects migration ensures that all data will be successfully migrated without losses, and passwork version 7 will be able to work with the updated database start migration windows server go to the root location of passwork powershell cd "c \inetpub\wwwroot\passwork" start the migration with the command powershell php d "memory limit= 1" \bin\console database\ v6\ migration linux depending on the operating system, the migration should be run as the user running the apache web server for deb based linux (ubuntu, debian, etc) deb sudo u www data bash c 'cd /var/www && yes | php d memory limit= 1 /bin/console database\ v6\ migration' for rpm based linux (centos, red hat, etc) rpm sudo u apache bash c 'cd /var/www && yes | php d memory limit= 1 /bin/console database\ v6\ migration' example of migration execution and correct completion when finished, these parameters in config env are no longer needed and can be deleted shell migration database url= migration database db= migration database username= migration database password= the last step for default encryption is complete and passwork can be put to work please see the actions after migration docid 8nu0w9o dlqmek2aqigyx passwork update to version 7 docid\ mirirltabi9ksiabc5ih1 data migration in the passwork web interface docid\ mwnrcazic9dik2mosqq98