
14th June 2010, 12:21
|
|
Senior Member
|
|
Join Date: Dec 2008
Posts: 112
Thanks: 5
Thanked 7 Times in 4 Posts
|
|
Migrate mail users from one ispconfig3 server to another
I want to migrate mail users for a SINGLE domain from one ispconfig3 server to another. I do not want to do it manually by entering all mail users one by one. What is the best way of doing this?
If I use mysqldump and import mail_users to the new server will ispconfig create the accounts in /var/vmail/ ?
I used mysqldump like this:
Code:
mysqldump -u root -p dbispconfig mail_user
--where="sys_groupid='30'";
and I will only use the line that begins with
Code:
-- -- Dumping data for table `mail_user` -- -- WHERE: sys_groupid='30'
Do I have to manually change the IDs? maybe use some replace option since mysqldump supports it?
|

14th June 2010, 20:15
|
|
ISPConfig Developer
|
|
Join Date: Jan 2007
Location: Wernau, Germany
Posts: 219
Thanks: 42
Thanked 34 Times in 24 Posts
|
|
dont do it!!!!
Quote:
Originally Posted by grungy
If I use mysqldump and import mail_users to the new server will ispconfig create the accounts in /var/vmail/ ?
|
NO! this is because of the way, the servers share their data. if you dump the new data to this table, all the other servers didn't know anything about this change and so they WILL NOT do anything.
You can only add them manually or with the remote-api but NEVER direct. You will destroy your Installation
|

14th June 2010, 20:18
|
|
Senior Member
|
|
Join Date: Dec 2008
Posts: 112
Thanks: 5
Thanked 7 Times in 4 Posts
|
|
What if I create the users manually and then import the data?
I would change the user ids etc....
|

15th June 2010, 08:38
|
|
ISPConfig Developer
|
|
Join Date: Jan 2007
Location: Wernau, Germany
Posts: 219
Thanks: 42
Thanked 34 Times in 24 Posts
|
|
Quote:
Originally Posted by grungy
What if I create the users manually and then import the data?
I would change the user ids etc....
|
Sorry, i would like to help you, but there is NO WAY.
This is because of the "ISPConfig 3 multiserver - kernel"
|

15th June 2010, 09:08
|
|
Senior Member
|
|
Join Date: Dec 2008
Posts: 112
Thanks: 5
Thanked 7 Times in 4 Posts
|
|
vogelor,
Why is the multiserver kernel thing relevant to this discussion? My two servers are not linked - they are not in a multiserver environment.
|

15th June 2010, 09:18
|
|
ISPConfig Developer
|
|
Join Date: Jan 2007
Location: Wernau, Germany
Posts: 219
Thanks: 42
Thanked 34 Times in 24 Posts
|
|
not 100% true, but to understand:
INTERALL we have:
1) the master -> the interface where you do your setup
2) n clients -> doing everything, the interface told them
this means, you have only ONE hardware, but INTERN you have 1 master (interface) and 1 client doing the email setup.
if you change the tables by your own, you only change the data, the interface displays BUT you do not tell the client to do the setup, this can only be done by the interface! if you edit the interface, the new data is stored in the tables AND the client gets a "command" to do what you change.
again, this is not 100% the truth, but "real enough" to understand the problem in short...
Olli
|

15th June 2010, 10:02
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,883
Thanks: 691
Thanked 4,188 Times in 3,205 Posts
|
|
Additionally to that what Olli (vogelor) said, migrating a complete install is possible when you copy the config files, maildirs, websites, ispconfig users in /etc/passwd, shadow, group and gshadow as well as the ispconfig database to the new server. But copying only the database will not work for the reasons that Olli explained.
|

15th June 2010, 10:06
|
|
Senior Member
|
|
Join Date: Dec 2008
Posts: 112
Thanks: 5
Thanked 7 Times in 4 Posts
|
|
Thanks for the info. My plan was to:
1. Manually add a domain to the second server
2. Manually open email accounts on the second server
3. Export only mail_users for that domain from the first server
4. Change the IDs so that they match the IDs on the second server
5. Import the mysql dump for the mail_users for that domain on the second server
|

15th June 2010, 10:13
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,883
Thanks: 691
Thanked 4,188 Times in 3,205 Posts
|
|
This will not work as vogelor pointed out, ispconfig needs a record in sys_datalog for every chnage that shall be written to disk. To create these records (they can not be copied from another server), you have to use the internal ispconfig database functions or the remoting API.
What is the benefit in importing the mysql dump after you created the users?
What you might do is this:
1) Copy the complete ispconfig database to the new server.
2) Copy the complete /var/vmail directory to the new server (with preserverd permissions).
3) Delete all email domains that you dont need from within ispconfig.
|

15th June 2010, 10:16
|
|
Senior Member
|
|
Join Date: Dec 2008
Posts: 112
Thanks: 5
Thanked 7 Times in 4 Posts
|
|
Quote:
Originally Posted by till
What is the benefit in importing the mysql dump after you created the users?
|
I guess this way I will migrate the passwords.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 04:25.
|
Recent comments
2 days 19 hours ago
3 days 4 hours ago
3 days 7 hours ago
3 days 8 hours ago
3 days 9 hours ago
3 days 11 hours ago
3 days 12 hours ago
3 days 14 hours ago
4 days 5 hours ago
4 days 6 hours ago