End of life for on-premise instances
At the end of March 2023, we cease on-premise hosting for Xentral instances. We encourage you to migrate your Xentral instance to our cloud - please do not hesitate to contact account@xentral.com for discussing and scheduling your cloud migration, or refer to our website or to our Community for more information.
Be aware that at the end of March 2023 we will stop any support services for on-premise hosted instances. There will be no further bug fixing or updates available. Likewise, we will not issue any further open source versions.
To move the server as a whole system, please refer to the article "Server move from xentral to xentral".
Note
In order to execute the following existing terminal commands it may be necessary to write "sudo" in front of them to gain access.
-
Exporting the database dump from the old system:
-
Either via Administration > System > Backup > Download System Backup > Create backup
-
or copy the userdata folder from /var/www/html/wawision/ via ssh, if the system backup is too large
-
-
Copy the downloaded files with e.g.: scp -r /path/file user@dnsname:path copy to the new server
-
Log in to the new server via ssh e.g.: ssh user@dnsname
-
Rename the existing userdata folder in /var/www/html/wawision e.g.. to userdata
-
Move new userdata folder to /var/www/html/wawision.
-
In the userdata folder are subfolders in which again subfolders with the Name of the old database exist. These folders must be renamed to the new database name.
-
Mostly the following folders are affected:
-
folder dms
-
folder emailbackup (if available)
-
folder pdfarchiv
-
folder pdfmirror
-
-
If there are other folders, they must be checked to see if there are any in the subfolders with old database names and be renamed. Existing files with the database name in the name must also be renamed, such as the stationery.
IT knowledge is mandatory for this!
Warning
With ignorance, data loss can be caused. xentral takes no responsibility for this.
-
Export database (extra or in the system backup created via the interface. available) on the new server with e.g.:
mysql -u username -p use NameTheNewDatabase; source path/filenameTheDatabaseToImport;
Example:
-
In conf/user.inc.php, the new database connection and the path to the userdata folder must be entered
-
To update the database, php upgradedbonly.php must still be executed
Peculiarities when switching between MariaDB and MySql. Views may be lost when exporting and importing the database in this case. After an update of the system, the views are available again. In case of a change from MariaDB to MySQL or vice versa, it may be necessary to reimport a script.
In the code below database user must be adjusted:.
'DEFINER=`xentral`@`localhost`'
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
Substitute structure of the view 'documents
CREATE TABLE IF NOT EXISTS `vouchers` (
`id` int(11)
,`address` int(11)
,`date` date
,`document number` varchar(255)
,`status` varchar(64)
,`country` varchar(255)
,`type` varchar(10)
,`sales_net` decimal(19,2)
,`revenue_net` decimal(19,2)
,`coverage_contribution` decimal(11,2)
,`commission_sum` decimal(11,2)
,`sales_id` int(11)
,`group` int(11)
);
-- --------------------------------------------------------
Substitute structure of the view `voucher_total
CREATE TABLE IF NOT EXISTS `vouchertotal` (
`id` int(11)
,`address` int(11)
,`date` date
,`document number` varchar(255)
,`status` varchar(64)
,`country` varchar(255)
,`type` varchar(12)
,`net_sales` varchar(23)
,`sales_gross` varchar(23)
,`revenue_net` varchar(21)
,`coverage_contribution` varchar(13)
,`commission_total` varchar(13)
,`salesid` varchar(11)
,`group` varchar(11)
,`project` varchar(222)
);
-- --------------------------------------------------------
--
-- proxy structure of view `belegeregs`
--
CREATE TABLE IF NOT EXISTS `belegeregs` (
`id` int(11)
,`address` int(11)
`date` date
,`document number` varchar(255)
,`status` varchar(64)
,`country` varchar(255)
,`type` varchar(10)
,`sales_net` decimal(19,2)
,`revenue_net` decimal(19,2)
,`coverage_contribution` decimal(11,2)
,`commission_sum` decimal(11,2)
,`sales_id` int(11)
,`group` int(11)
,`project` varchar(222)
);
-- --------------------------------------------------------
--
-- structure of the view `vouchers
--
DROP TABLE IF EXISTS `vouchers`;
CREATE ALGORITHM=UNDEFINED DEFINER=`xentral`@`localhost` SQL SECURITY DEFINER VIEW `vouchers` AS select `invoice`.`id` AS `id`,`invoice`.`address` AS `address`,`invoice`.`date` AS `date`,`invoice`.`legnr` AS `legnr`,`invoice`. `status` AS `status`,`invoice`.`country` AS `country`, `invoice` AS `type`,`invoice`.`sales_net` AS `sales_net`,`invoice`.`revenue_net` AS `revenue_net`,`invoice`.`coverage_contribution` AS `coverage_contribution`,`invoice`. `commission_sum` AS `commission_sum`,`invoice`.`salesid` AS `salesid`,`invoice`.`group` AS `group` from `invoice` where (`invoice`.`status` <> 'created') union all select `credit`.`id` AS `id`,`credit`. `address` AS `address`,`credit`.`date` AS `date`,`credit`.`voucher_no` AS `voucher_no`,`credit`.`status` AS `status`,`credit`.`country` AS `country`,'credit` AS `type`,(`credit`.`sales_net` * -(1)) AS `sales_net*-1`,(`credit`.`erloes_net` * -(1)) AS `revenue_net*-1`,(`credit`.`contribution_to_coverage` * -(1)) AS `coverage_contribution*-1`,(`credit_statement`.`commission_sum` * -(1)) AS `commission_sum*-1`,`gutschrift`.`vertriebid` AS `vertriebid`,`gutschrift`.`group` AS `group` from `gutschrift` where (`gutschrift`.`status` <> 'created');
-- --------------------------------------------------------
--
-- structure of the view `voucher_total
--
DROP TABLE IF EXISTS `voucher total`;
CREATE ALGORITHM=UNDEFINED DEFINER=`xentral`@`localhost` SQL SECURITY DEFINER VIEW `vouchertotal` AS select `invoice`.`id` AS `id`,`invoice`.`address` AS `address`,`invoice`.`date` AS `date`,`invoice`. `invoice` AS `invoice`,`invoice`.`status` AS `status`,`invoice`.`country` AS `country`, `invoice` AS `type`,`invoice`.`sales_net` AS `sales_net`,`invoice`.`debit` AS `sales_gross`,`invoice`.`sales_net` AS `sales_net`,`invoice`. `contribution` AS `contribution`,`invoice`.`commission_sum` AS `commission_sum`,`invoice`.`salesid` AS `salesid`,`invoice`.`group` AS `group`,`invoice`.`project` AS `project` from `invoice` union all select `credit`. `id` AS `id`,`credit`.`address` AS `address`,`credit`.`date` AS `date`,`credit`.`voucher_no` AS `voucher_no`,`credit`.`status` AS `status`,`credit`.`country` AS `country`,'credit` AS `type`,(`credit`.`sales_net` * -(1)) AS `sales_net*-1`,(`credit`.`debit` * -(1)) AS `sales_gross*-1`,(`credit`.`erloes_net` * -(1)) AS `revenue_net*-1`,(`credit`.`contribution_to_coverage` * -(1)) AS `coverage_contribution*-1`,(`credit_statement`.`commission_sum` * -(1)) AS `commission_sum*-1`,`credit`.`salesid` AS `salesid`,`credit`.`group` AS `group`,`credit`.`project` AS `project` from `credit` union all select `order`.`id` AS `id`,`order`. `address` AS `address`,`order`.`date` AS `date`,`order`.`voucher` AS `voucher`,`order`.`status` AS `status`,`order`.`country` AS `country`,'order` AS `type`,`order`.`sales_net` AS `sales_net`,`order`. `total` AS `sales_gross`,`order`.`revenue_net` AS `revenue_net`,`order`.`coverage_contribution` AS `coverage_contribution`,`order`.`commission_sum` AS `commission_sum`,`order`.`salesid` AS `salesid`,`order`. `group` AS `group`,`order`.`project` AS `project` from `order` union all select `order`.`id` AS `id`,`order`.`address` AS `address`,`order`.`date` AS `date`,`order`. `order_id` AS `order_id`,`order`.`status` AS `status`,`order`.`country` AS `country`, `order` AS `type`,`order`.`total` AS `sales_net`,`order`. `total` AS `sales_gross`,'0' AS `erloes_net`,'0' AS `coverage`,'0' AS `commission_total`,'0' AS `salesid`,'0' AS `group`,`order`.`project` AS `project` from `order` union all select `delivery_note`.`id` AS `id`,`delivery_note`. `address` AS `address`,`delivery note`.`date` AS `date`,`delivery note`.`document number` AS `document number`,`delivery note`.`status` AS `status`,`delivery note`. `country` AS `country`, `delivery note` AS `type`, `0` AS `sales_net`, `0` AS `sales_gross`, `0` AS `erloes_net`, `0` AS `coverage_contribution`, `0` AS `commission_total`, `0` AS `salesid`, `0` AS `group`,`delivery note`.`project` AS `project` from `delivery note`;
-- --------------------------------------------------------
--
-- structure of the view `belegeregs`
--
DROP TABLE IF EXISTS `belegeregs`;
CREATE ALGORITHM=UNDEFINED DEFINER=`xentral`@`localhost` SQL SECURITY DEFINER VIEW `documents` AS select `invoice`.`id` AS `id`,`invoice`.`address` AS `address`,`invoice`.`date` AS `date`,`invoice`.`documents` AS `documents`,`invoice`. `status` AS `status`,`invoice`.`country` AS `country`, `invoice` AS `type`,`invoice`.`sales_net` AS `sales_net`,`invoice`.`revenue_net` AS `revenue_net`,`invoice`.`coverage_contribution` AS `coverage_contribution`,`invoice`. `commission_sum` AS `commission_sum`,`invoice`.`salesid` AS `salesid`,`invoice`.`group` AS `group`,`invoice`.`project` AS `project` from `invoice` union all select `credit`.`id` AS `id`,`credit`. `address` AS `address`,`credit_credit`.`date` AS `date`,`credit_credit`.`voucher_no` AS `voucher_no`,`credit_credit`.`status` AS `status`,`credit_credit`.`country` AS `country`,'credit_credit` AS `type`,(`credit_credit`.`sales_net` * -(1)) AS `sales_net*-1`,(`credit`.`erloes_net` * -(1)) AS `revenue_net*-1`,(`credit`.`contribution_to_coverage` * -(1)) AS `coverage_contribution*-1`,(`credit_statement`.`commission_sum` * -(1)) AS `commission_sum*-1`,`credit`.`salesid` AS `salesid`,`credit`.`group` AS `group`,`credit`.`project` AS `project` from `credit`;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-
An update should still be performed via the xentral interface, for more details see "Access to the update server"
-
Finally, the webserver must be able to access the userdata folder. This is done with chown -R www-data:www-data *
-
To check if the webserver can access the userdata folder, via the interface of xentral a file or an article or an Address can be uploaded and then downloaded again. If the file has a size of 0 bytes the permissions are probably not correct. If the File can be opened, however, everything has worked.
A copy to an existing new test system proceeds basically the same as a data move of the live system to another server.
The following must be additionally observed and set here:
-
After the DB is copied and you log in, you will find the old "license + key" (the access data to the updated server) in the company data
-
This means, that you have to import the new "license + key" in advance per phpmyadmin for the Test system
Warning
This is only true, if you work with different versions of PHP.
-
In the table, company data can also be exchanged via phpmyadmin.
-
Update your system with the interface on [[http://url/update.php]]