Migrating old hmail to new hardware - help needed

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Freedom
Normal user
Normal user
Posts: 44
Joined: 2008-01-29 17:25
Location: Slovakia
Contact:

Migrating old hmail to new hardware - help needed

Post by Freedom » 2016-08-18 12:54

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

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: Migrating old hmail to new hardware - help needed

Post by SorenR » 2016-08-18 16:20

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
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

Freedom
Normal user
Normal user
Posts: 44
Joined: 2008-01-29 17:25
Location: Slovakia
Contact:

Re: Migrating old hmail to new hardware - help needed

Post by Freedom » 2016-08-18 16:31

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....

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: Migrating old hmail to new hardware - help needed

Post by SorenR » 2016-08-18 16:41

http://www.howtogeek.com/howto/16226/co ... -or-linux/

Code: Select all

mklink /J "C:\Program Files"  "C:\Program Files (x86)"
8)
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Migrating old hmail to new hardware - help needed

Post by ^DooM^ » 2016-08-18 23:36

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!!
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: Migrating old hmail to new hardware - help needed

Post by jimimaseye » 2016-08-19 11:51

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.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Post Reply