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?
dont do it!!!! 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
Sorry, i would like to help you, but there is NO WAY. This is because of the "ISPConfig 3 multiserver - kernel"
vogelor, Why is the multiserver kernel thing relevant to this discussion? My two servers are not linked - they are not in a multiserver environment.
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
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.
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
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.
Ok thanks. Can I migrate DNS entries from one server to another? I guess this could work since mydns is purely database driven?