Page 1 of 1

Migrating old hmail to new hardware - help needed

Posted: 2016-08-18 12:54
by Freedom
I need some consultation to very old Hmail server version and migration to new hardware.

I got 5.4 hmail build 1950 on 12 year old computer :-( i need to migrate this Hmail to new hardware.

As host on old computer i use windows xp pro 32bit
new host is windows 7 pro 64 bit

I got about 0,5 million email mesages on the old computer and aprox. 50% of them has full path name in the database and 50% doesn´t. I try directory synchronizer app., but it doesn´t remove the path from database. It takes ages to run, about 18 hours :-(

My point is that on windows xp the path is c:\program files\hmail\.... on windows 7 the path will be c:\program files (x 86)\hmail\... it doesnt match. I think, but i am not sure, that i can update mysql table directly and remove path names via sql command, but i am not sure if i could do it this way and it has no other side effects. Dont want to loose those emails.

Can I do it without any harm?

After mysql update I hope it wont stop working on old computer or? This computer is really slow i have to schedule the migration on different day so i have to do the migration on several small steps.

Another question is how to migrate data. I just need to dump mysql database and restore it on new host?

Hmail server is the same build on both computers only mysql engine version doesnt match. I am wondering if all setting in hmail server are written in the database and hmail.ini, so i olny need dump hmail database from old host, hmail.ini from old host and data folder with emails, then i move it to new host, do mysql restore and restart hmail servis and all starts working? (dont need to talk about ip adresses change etc..) i need to know if i can fully move hmail with all settings like it was in old host to new host this way?

Third questions is the right sql command to remove full path from database, i am not really good in SQL, dont want to mess up my hmail database.

thx a lot for any help

Re: Migrating old hmail to new hardware - help needed

Posted: 2016-08-18 16:20
by SorenR

Code: Select all

UPDATE hm_messages SET messagefilename=REPLACE(messagefilename, messagefilename, right(messagefilename,42));
It should keep the last 42 characters of the messagefilename - like the bold text here...

C:\Program Files (x86)\hMailServer\Data\{E6120459-4E06-43A9-9EA2-F4A541586175}.eml

Re: Migrating old hmail to new hardware - help needed

Posted: 2016-08-18 16:31
by Freedom
thx for the SQL command u just reply.

I am aware of that, that i have to keep the last 42 characters, but i am not good in SQL....

Re: Migrating old hmail to new hardware - help needed

Posted: 2016-08-18 16:41
by SorenR
http://www.howtogeek.com/howto/16226/co ... -or-linux/

Code: Select all

mklink /J "C:\Program Files"  "C:\Program Files (x86)"
8)

Re: Migrating old hmail to new hardware - help needed

Posted: 2016-08-18 23:36
by ^DooM^
SorenR wrote:http://www.howtogeek.com/howto/16226/co ... -or-linux/

Code: Select all

mklink /J "C:\Program Files"  "C:\Program Files (x86)"
8)
That is genius SorenR!!

Re: Migrating old hmail to new hardware - help needed

Posted: 2016-08-19 11:51
by jimimaseye
Quick reply:

Do backup.

Do upgrade.

Do path check: viewtopic.php?f=21&t=28914 (full instructions)

Do testing.

(Double check with documentation for hand-holding: https://www.hmailserver.com/documentati ... mendations and https://www.hmailserver.com/documentati ... e_ToLatest


FYI: Data Directory Synchroniser - how to increase the speed: viewtopic.php?f=21&t=29828 - NOTE: This also will give you clear instructuions on how to 'enter' the MySQL environment for running the path-check SQL command.