The error number must be randomly generated because it doesn't exist in the code.
How to manually backup and restore a ProcessMaker workspace
If the
processmaker workspace-backup and
processmaker workspace-restore commands cannot be used for some reason, then the workspace files can be manually copied and the workspace's database can be manually copied and restored. If migrating between two ProcessMaker servers, remember that both need to have the same version of ProcessMaker installed.
1. Create a backup of the workspace's files which are located at:
processmaker/shared/sites/{workspace}
The
tar command can be used on Linux systems. For example, the following commands create a backup of the workflow workspace on a Linux system:
cd /opt/processmaker/shared/sites
tar cJf workflowFiles.tar.xz workflow
2. Then, restore the workspace files in the
processmaker/shared/sites directory.
On a Linux system, the command to see the contents of the workspace's tarball would be something like:
tar tJf workflowFiles.tar.xz
The commands to restore the workspace files would be something like:
cd /opt/processmaker/shared/sites
tar xJvf workflowFiles.tar.xz
Note: If needing to rename the workspace, then first create a directory for the workspace like this:
cd /opt/processmaker/shared/sites
mkdir accounting
Then restore to that new directory:
tar xJvf worflowFiles.tar.xz -C accounting --strip-components 1
Finally, change the ownership of the workspace files to the Apache user which is "apache" in Red Hat/CentOS and "www-data" in Debian/Ubuntu:
chown -R apache:apache processmaker/shared/sites/[workspace]
For example:
3. Next, create a backup of the workspace's database with the following command:
mysqldump -u [username] -p[password] -h [host] [databaseName] > [backup-name].sql
For example:
mysqldump -u root -p -h localhost wf_workflow > workflowBackup.sql
4. Then, restore the workspace's database in MySQL. The MySQL user which accesses the workspace's database will need to be manually created in MySQL. The name of the user and his password is listed in the
processmaker/shared/sites/{workspace}/db.php file.
For example, if the
db.php file looks like this:
Code: Select all<?php
// Processmaker configuration
define ('DB_ADAPTER', 'mysql' );
define ('DB_HOST', 'localhost' );
define ('DB_NAME', 'wf_workflow320' );
define ('DB_USER', 'wf_591d22ee0d21b' );
define ('DB_PASS', 'xRwGM1N$_fAtD5J' );
define ('DB_RBAC_HOST', 'localhost' );
define ('DB_RBAC_NAME', 'wf_workflow320' );
define ('DB_RBAC_USER', 'wf_591d22ee0d21b' );
define ('DB_RBAC_PASS', 'xRwGM1N$_fAtD5J' );
define ('DB_REPORT_HOST', 'localhost' );
define ('DB_REPORT_NAME', 'wf_workflow320' );
define ('DB_REPORT_USER', 'wf_591d22ee0d21b' );
define ('DB_REPORT_PASS', 'xRwGM1N$_fAtD5J' );
Then, create a database named "wf_workflow320" and create a user named "wf_591d22ee0d21b" with the password "xRwGM1N$_fAtD5J" who has all permissions to access the "wf_workflow320" database on the "localhost" host.
To manually create the database and user in MySQL, login to MySQL with the root user:
mysql -u root -p -h localhost
Then, create the workspace's database. For example:
mysql>
CREATE DATABASE wf_workflow320;
It is recommended to use the same database name, but if wishing to change the database name, then see the note below.
Then, create the MySQL user with all permissions to access that new database with the following command:
mysql>
grant all on [database].* to '[user]'@'[host]' identified by '[password]' with grant option;
For example:
mysql>
grant all on wf_workflow320.* to 'wf_591d22ee0d21b'@'localhost' identified by 'xRwGM1N$_fAtD5J' with grant option;
Then, exit MySQL:
mysql>
exit;
Finally, restore the database to the database which was created with the following command:
mysql -u [username] -p[password] -h [host] [databaseName] < [filename].sql
For example:
mysql -u root -p -h localhost wf_workflow320 < workflowBackup.sql
Note: If wishing to change the server's hostname, the workspace's database name, the MySQL user or his password, then edit both the shared/sites/[workspace]/db.php and shared/sites/[workspace]/databases.php files with a plain text editor to change those values. If changing the location of the shared directory which holds the workspace files, then edit the paths of the PATH_DATA and PATH_C which are defined in the processmaker/workflow/engine/config/paths_installed.php file.
Now the restored workspace should be ready to be used in ProcessMaker.