switching to new domain

Get help from the community here.

Moderator: Developers

piaveservizi
Posts: 2
Joined: Tue Oct 08, 2019 9:54 am

switching to new domain

Postby piaveservizi » Tue Oct 08, 2019 10:13 am

Hello,
we have mail server + groupoffice with an old install (6.1 on Debian)
Now I have to move from olddomain.com to newdomain.org: is there a recommended way to do this? I would install a new server, and migrate all users, their data and passwords without recreate the accounts, if possible.
Thank you for any advice,
Luca.
mschering
Site Admin
Site Admin
Posts: 8354
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: switching to new domain

Postby mschering » Thu Oct 10, 2019 1:42 pm

Hi,

Here's documented how to migrate:

https://groupoffice.readthedocs.io/en/latest/migrate.html
Best regards,

Merijn Schering
Intermesh
piaveservizi
Posts: 2
Joined: Tue Oct 08, 2019 9:54 am

Re: switching to new domain

Postby piaveservizi » Fri Oct 18, 2019 3:27 pm

Hi,
I managed to upgrade the old server to Debian buster and GO 6.2, and it's working.
Then I tried to migrate the domain: on a test machine I installed GO6.2 but just before restoring the database I have substituted the olddomain with newdomain in the sql file. Also this step went fine.
Now i would to upgrade this machine to 6.3: I follow the steps as in
https://groupoffice.readthedocs.io/en/latest/upgrade/debian.html#from-older-versions-than-6-3
and when I come to the "visit http://yourserver/groupoffice and the installer should appear:" phase it passes the test (all green OK!s) but the upgrade.php script exits with the following errors:
Upgrading Group-Office

DROP TABLE IF EXISTS `go_mail_counter`;
Converting ab_settings to utf8mb4
Converting cf_ti_tickets to utf8mb4
Converting dav_contacts to utf8mb4
Converting dav_events to utf8mb4
Converting dav_tasks to utf8mb4
Converting go_clients to utf8mb4
Converting go_links_ab_addresslists to utf8mb4
Converting go_links_ti_tickets to utf8mb4
Converting pr2_default_resources to utf8mb4
Converting pr2_employees to utf8mb4
Converting pr2_expenses to utf8mb4
Converting pr2_hours to utf8mb4
Converting pr2_income to utf8mb4
Converting pr2_portlet_statuses to utf8mb4
Converting pr2_projects to utf8mb4
Converting pr2_resources to utf8mb4
Converting pr2_standard_tasks to utf8mb4
Converting pr2_statuses to utf8mb4
Converting pr2_tasks to utf8mb4
Converting pr2_templates to utf8mb4
Converting pr2_templates_events to utf8mb4
Converting pr2_timers to utf8mb4
Converting pr2_types to utf8mb4
Converting sy_anchors to utf8mb4
Converting sy_devices to utf8mb4
Converting sy_maps to utf8mb4
Converting sync_addressbook_user to utf8mb4
Converting sync_calendar_user to utf8mb4
Converting sync_devices to utf8mb4
Converting sync_note_categories_user to utf8mb4
Converting sync_settings to utf8mb4
Converting sync_tasklist_user to utf8mb4
Converting ti_groups to utf8mb4
Converting ti_messages to utf8mb4
Converting ti_rates to utf8mb4
Converting ti_settings to utf8mb4
Converting ti_statuses to utf8mb4
Converting ti_templates to utf8mb4
Converting ti_tickets to utf8mb4
Converting ti_types to utf8mb4
Converting zpa_devices to utf8mb4
UPDATE go_settings SET value=0 where name = 'version';
ALTER TABLE `go_modules` ADD `package` VARCHAR(100) NULL DEFAULT NULL AFTER `id`;
ALTER TABLE `go_modules` CHANGE `id` `id` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';
RENAME TABLE `go_modules` TO `core_module`;
ALTER TABLE `core_module` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `core_module` CHANGE `id` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';
ALTER TABLE `core_module` DROP PRIMARY KEY;
ALTER TABLE `core_module` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
ALTER TABLE `core_module` ADD UNIQUE(`name`);
ALTER TABLE `core_module` CHANGE `acl_id` `aclId` INT(11) NOT NULL;
ALTER TABLE `core_module` ADD INDEX(`aclId`);
ALTER TABLE `core_module` ADD CONSTRAINT `acl` FOREIGN KEY (`aclId`) REFERENCES `go_acl_items`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
CREATE TABLE `core_auth_token` (
`accessToken` varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`userId` int(11) NOT NULL,
`createdAt` datetime NOT NULL,
`expiresAt` datetime NOT NULL,
`remoteIpAddress` varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`userAgent` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `core_state` (
`entityClass` varchar(190) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`highestModSeq` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `core_auth_token`
ADD PRIMARY KEY (`accessToken`),
ADD KEY `userId` (`userId`);
ALTER TABLE `core_state`
ADD PRIMARY KEY (`entityClass`);
ALTER TABLE `go_groups` CHANGE `user_id` `createdBy` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `go_groups` CHANGE `acl_id` `aclId` INT(11) NOT NULL;
ALTER TABLE `go_groups` DROP `admin_only`;
ALTER TABLE `go_groups` ADD `isUserGroupFor` INT NULL DEFAULT NULL AFTER `aclId`, ADD INDEX (`isUserGroupFor`);
ALTER TABLE `go_acl` DROP INDEX `acl_id_2`;
ALTER TABLE `go_acl` DROP INDEX `acl_id`;
ALTER TABLE `go_acl` ADD INDEX(`level`);
ALTER TABLE `go_groups` CHANGE `aclId` `aclId` INT(11) NULL DEFAULT NULL;
ALTER TABLE `go_acl_items` CHANGE `user_id` `ownedBy` INT(11) NOT NULL;
ALTER TABLE `go_acl_items` ADD `modifiedAt` DATETIME NULL DEFAULT NULL AFTER `mtime`;
update `go_acl_items` set modifiedAt = from_unixtime(mtime);
ALTER TABLE `go_acl_items` DROP `mtime`;
delete from go_acl where user_id > 0 AND user_id not in (select id from go_users)
delete from go_acl where group_id > 0 AND group_id not in (select id from go_groups)
ALTER TABLE `go_acl` CHANGE `group_id` `groupId` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `go_acl` CHANGE `acl_id` `aclId` INT(11) NOT NULL;
ALTER TABLE `go_groups` CHANGE `name` `name` VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
DROP TRIGGER IF EXISTS `Create ACL`;
CREATE TRIGGER `Create ACL` BEFORE INSERT ON `go_groups` FOR EACH ROW BEGIN INSERT INTO `go_acl_items` (`ownedBy`, `description`) VALUES (NEW.createdBy, 'go_groups.aclId'); set NEW.aclId = (SELECT last_insert_id()); END
insert into go_groups (name, createdBy, isUserGroupFor) select username,id,id from go_users;
DROP TRIGGER IF EXISTS `Create ACL`;
ALTER TABLE `go_acl` DROP PRIMARY KEY;
insert into `go_acl` (groupId, aclId, level) select id,aclId,50 from go_groups where isUserGroupFor is not null;
insert into `go_acl` (groupId, aclId, level) select '1',aclId,50 from go_groups where isUserGroupFor is not null;
ALTER TABLE `go_groups` CHANGE `createdBy` `createdBy` INT(11) NOT NULL;
update `go_acl` a set groupId = (select id from go_groups where isUserGroupFor = a.user_id) where user_id > 0;
ALTER TABLE `go_acl` DROP `user_id`;
delete from go_acl where aclId not in (select id from go_acl_items);
ALTER TABLE `go_acl` ADD PRIMARY KEY( `aclId`, `groupId`);
ALTER TABLE `go_users_groups` CHANGE `group_id` `groupId` INT(11) NOT NULL;
ALTER TABLE `go_users_groups` CHANGE `user_id` `userId` INT(11) NOT NULL;
insert into `go_users_groups` select id,isUserGroupFor from go_groups where isUserGroupFor is not null;
DROP TABLE go_db_sequence;
ALTER TABLE `go_acl_items` CHANGE `description` `usedIn` VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL;
delete from go_users_groups where userId not in(select id from go_users);
delete from go_users_groups where groupId not in(select id from go_groups);
delete from go_acl where groupId not in(select id from go_groups);
ALTER TABLE `go_acl` ADD FOREIGN KEY (`groupId`) REFERENCES `go_groups`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `go_users_groups` ADD FOREIGN KEY (`groupId`) REFERENCES `go_groups`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT; ALTER TABLE `go_users_groups` ADD FOREIGN KEY (`userId`) REFERENCES `go_users`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `go_groups` ADD FOREIGN KEY (`aclId`) REFERENCES `go_acl_items`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
ALTER TABLE `go_groups` ADD FOREIGN KEY (`isUserGroupFor`) REFERENCES `go_users`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `go_acl` ADD FOREIGN KEY (`aclId`) REFERENCES `go_acl_items`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `go_users` DROP `acl_id`;
RENAME TABLE `go_acl` TO `core_acl_group`;
RENAME TABLE `go_acl_items` TO `core_acl`;
CREATE TABLE `core_acl_group_changes` (
`aclId` int(11) NOT NULL,
`groupId` int(11) NOT NULL,
`grantModSeq` int(11) NOT NULL,
`revokeModSeq` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `core_acl_group_changes`
ADD PRIMARY KEY (`aclId`,`groupId`);
insert `core_acl_group_changes` select aclId, groupId, 1, null from core_acl_group
ALTER TABLE `core_acl_group_changes` ADD FOREIGN KEY (`aclId`) REFERENCES `core_acl`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT; ALTER TABLE `core_acl_group_changes` ADD FOREIGN KEY (`groupId`) REFERENCES `go_groups`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
RENAME TABLE `cf_categories` TO `core_customfields_field_set`;
ALTER TABLE `core_customfields_field_set` CHANGE `extends_model` `extendsModel` VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `core_customfields_field_set` CHANGE `acl_id` `aclId` INT(11) NOT NULL;
ALTER TABLE `core_customfields_field_set` CHANGE `sort_index` `sortOrder` TINYINT(4) NOT NULL DEFAULT '0';
ALTER TABLE `cf_fields` ADD `prefix` VARCHAR( 32 ) NOT NULL DEFAULT '', ADD `suffix` VARCHAR( 32 ) NOT NULL DEFAULT '';
ERROR: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'prefix' Query ALTER TABLE `cf_fields` ADD `prefix` VARCHAR( 32 ) NOT NULL DEFAULT '', ADD `suffix` VARCHAR( 32 ) NOT NULL DEFAULT '';RENAME TABLE `cf_fields` TO `core_customfields_field`;
ALTER TABLE `core_customfields_field` CHANGE `category_id` `fieldSetId` INT(11) NOT NULL;
ALTER TABLE `core_customfields_field` CHANGE `sort_index` `sortOrder` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `core_customfields_field` CHANGE `validation_regex` `validationRegex` VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `core_customfields_field` CHANGE `validationRegex` `validationRegex` VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL;
ALTER TABLE `core_customfields_field` ADD `options` TEXT NULL DEFAULT NULL AFTER `suffix`;
ALTER TABLE `core_customfields_field`
DROP `multiselect`,
DROP `max`,
DROP `nesting_level`,
DROP `treemaster_field_id`,
DROP `height`,
DROP `number_decimals`,
DROP `function`,
DROP `max_length`,
DROP `extra_options`;
ALTER TABLE `core_customfields_field` DROP `addressbook_ids`;
ALTER TABLE `core_customfields_field` DROP `validationRegex`;
ALTER TABLE `core_customfields_field` ADD `databaseName` VARCHAR(190) NOT NULL AFTER `name`;
UPDATE `core_customfields_field` set databaseName = concat("col_", id);
DELETE FROM `go_model_types` WHERE model_name="GO\\Projects\\Model\\Project";
RENAME TABLE `go_model_types` TO `core_entity`;
ALTER TABLE `core_entity` CHANGE `model_name` `name` VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `core_entity` ADD `moduleId` INT NULL DEFAULT NULL AFTER `id`, ADD INDEX (`moduleId`);
ALTER TABLE `core_entity` ADD INDEX(`name`);
ALTER TABLE `core_entity` ADD `clientName` VARCHAR(190) NULL DEFAULT NULL;
ALTER TABLE `core_entity` ADD UNIQUE(`clientName`);
insert into core_entity (name) select extendsModel from core_customfields_field_set where extendsModel not in (select name from core_entity)
ALTER TABLE `core_customfields_field_set` ADD `entityId` INT NOT NULL AFTER `id`, ADD INDEX (`entityId`);
DELETE t1 FROM core_entity t1 INNER JOIN core_entity t2 WHERE t1.id > t2.id AND t1.name = t2.name;
update `core_customfields_field_set` set entityId = (select id from core_entity where name = extendsModel);
ALTER TABLE `core_entity` DROP INDEX `name`;
[2019-10-18T14:45:45+00:00] ErrorException in Unknown at line 0:
The encoded file /usr/share/groupoffice/modules/projects2/model/Project.php requires a license file groupoffice-pro-6.3-license.txt.



Debug dump:

Array
(
)

It's a test machine (new IP and name) and a new domain so I can't use the license installed on the original, and to make the test I'm not interested in professional modules: maybe there's other kind of problems?

Thanks,
Luca.
mschering
Site Admin
Site Admin
Posts: 8354
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: switching to new domain

Postby mschering » Tue Oct 22, 2019 9:33 am

It should ignore the pro modules if no license file is present but it doesn't look like that's working. An easy fix would be to request a temporary license from our support to test it.

Alternatively you could disable the modules by and in the database by setting enabled to false.
Best regards,

Merijn Schering
Intermesh

Who is online

Users browsing this forum: No registered users and 6 guests