Re: [vchkpw] Qmail migration

2010-06-16 Thread Thibault Richard

Hello,

I'm pretty sure this script is working well but this is what I've recently 
done :



1° Modify MX test domain
2° Stop previous server+ copy DB

previous_server:~# /etc/init.d/apache2 stop
previous_server:~# 
/usr/bin/mysqldump -c -C -e -Q --add-drop-table -uroot -p***password*** 
vpopmail  /backups/vpopmail.sql

previous_server:~# scp /backups/vpopmail.sql r...@new_server
previous_server:~# qmailctl stop

3° Copy config files

previous_server:~# cd /var/qmail/control
previous_server:~# scp morercpthosts rcpthosts virtualdomains 
r...@new_server:/var/qmail/control

previous_server:~# cd /var/qmail/users
previous_server:~# scp assign r...@news_server:/var/qmail/users/

4° Import DB + synchronise mails

new_server:~# qmailctl stop
new_server:~# mysql -Dvpopmail -p***password***  /root/vpopmail.sql
new_server:~# sed s/1007:111/1007:112/g /var/qmail/users/assign  
/var/qmail/users/assign.new
(ADADT the UID/GID to what you've found in /etc/passwd in previous_server 
and new_server)

new_server:~# cat /var/qmail/users/assign.new
new_server:~# mv /var/qmail/users/assign.new /var/qmail/users/assign
new_server:~# /var/qmail/bin/qmail-newu
new_server:~# /var/qmail/bin/qmail-newmrh
new_server:~# rsync -avz --delete 
r...@previous_server:/home/vpopmail/domains/ /home/vpopmail/domains/

new_server:~# #find /home/vpopmail -uid 1007 -exec chown vpopmail {} \;
(ADADT the UID to what you've found in /etc/passwd in previous_server and 
new_server)

new_server:~# #find /home/vpopmail -gid 1008 -exec chgrp vchkpw {} \;
(ADADT the UID to what you've found in /etc/passwd in previous_server and 
new_server)

new_server:~# mysql
use vpopmail;
update dir_control SET domain='dom_1007' WHERE domain='dom_1054'; (ADADT the 
UID to what you've found in /etc/passwd in previous_server and new_server)


new_server:~# qmailctl start

Hope this help !

Thibault

- Original Message - 
From: Ron Miller rmil...@coinserv.net

To: vchkpw@inter7.com
Sent: Wednesday, June 16, 2010 2:20 AM
Subject: RE: [vchkpw] Qmail migration



Here is how:

http://qmail.jms1.net/scripts/migrate-domain.shtml

Be sure NOT to use IE. Use Firefox instead.

I have used this script many times.

-Ron

-Original Message-
From: ta...@nayatel.com [mailto:ta...@nayatel.com]
Sent: Tuesday, June 15, 2010 1:34 PM
To: vchkpw@inter7.com
Subject: [vchkpw] Qmail migration

please suggest

I am migrating Qmail from one Machine to another.Have taken following
steps but no luck.

1- I have taken dump of Mysql and and restored it on new machine.
2- SCP all Domain and email boxes to new machine.
3- Fixed all permissions.

while giving command vdomaininfo or vuserinof it does not find the domain.




This message was sent using IMP, the Internet Messaging Program.












!DSPAM:4c1881f032712969921331!



Re: [vchkpw] Qmail migration

2010-06-16 Thread tariq



Thanks to every body for valuable suggestions. I am working to have  
actual migration in next few days.
Another question. I want to install 2 or 3 qmail servers in a load  
balancing and active failover model.

Can any body help suggest the design from your experience... thanks

Tariq


Quoting Thibault Richard th...@thibs.com:


Hello,

I'm pretty sure this script is working well but this is what I've  
recently done :



1° Modify MX test domain
2° Stop previous server+ copy DB

previous_server:~# /etc/init.d/apache2 stop
previous_server:~# /usr/bin/mysqldump -c -C -e -Q --add-drop-table  
-uroot -p***password*** vpopmail  /backups/vpopmail.sql

previous_server:~# scp /backups/vpopmail.sql r...@new_server
previous_server:~# qmailctl stop

3° Copy config files

previous_server:~# cd /var/qmail/control
previous_server:~# scp morercpthosts rcpthosts virtualdomains  
r...@new_server:/var/qmail/control

previous_server:~# cd /var/qmail/users
previous_server:~# scp assign r...@news_server:/var/qmail/users/

4° Import DB + synchronise mails

new_server:~# qmailctl stop
new_server:~# mysql -Dvpopmail -p***password***  /root/vpopmail.sql
new_server:~# sed s/1007:111/1007:112/g /var/qmail/users/assign   
/var/qmail/users/assign.new
(ADADT the UID/GID to what you've found in /etc/passwd in  
previous_server and new_server)

new_server:~# cat /var/qmail/users/assign.new
new_server:~# mv /var/qmail/users/assign.new /var/qmail/users/assign
new_server:~# /var/qmail/bin/qmail-newu
new_server:~# /var/qmail/bin/qmail-newmrh
new_server:~# rsync -avz --delete  
r...@previous_server:/home/vpopmail/domains/ /home/vpopmail/domains/

new_server:~# #find /home/vpopmail -uid 1007 -exec chown vpopmail {} \;
(ADADT the UID to what you've found in /etc/passwd in  
previous_server and new_server)

new_server:~# #find /home/vpopmail -gid 1008 -exec chgrp vchkpw {} \;
(ADADT the UID to what you've found in /etc/passwd in  
previous_server and new_server)

new_server:~# mysql
use vpopmail;
update dir_control SET domain='dom_1007' WHERE domain='dom_1054';  
(ADADT the UID to what you've found in /etc/passwd in  
previous_server and new_server)


new_server:~# qmailctl start

Hope this help !

Thibault

- Original Message - From: Ron Miller rmil...@coinserv.net
To: vchkpw@inter7.com
Sent: Wednesday, June 16, 2010 2:20 AM
Subject: RE: [vchkpw] Qmail migration



Here is how:

http://qmail.jms1.net/scripts/migrate-domain.shtml

Be sure NOT to use IE. Use Firefox instead.

I have used this script many times.

-Ron

-Original Message-
From: ta...@nayatel.com [mailto:ta...@nayatel.com]
Sent: Tuesday, June 15, 2010 1:34 PM
To: vchkpw@inter7.com
Subject: [vchkpw] Qmail migration

please suggest

I am migrating Qmail from one Machine to another.Have taken following
steps but no luck.

1- I have taken dump of Mysql and and restored it on new machine.
2- SCP all Domain and email boxes to new machine.
3- Fixed all permissions.

while giving command vdomaininfo or vuserinof it does not find the domain..




This message was sent using IMP, the Internet Messaging Program.




















This message was sent using IMP, the Internet Messaging Program.


!DSPAM:4c18cf5132711705318265!



Re: [vchkpw] Qmail migration

2010-06-15 Thread Rick Macdougall

On 15/06/2010 1:34 PM, ta...@nayatel.com wrote:

please suggest

I am migrating Qmail from one Machine to another.Have taken following
steps but no luck.

1- I have taken dump of Mysql and and restored it on new machine.
2- SCP all Domain and email boxes to new machine.
3- Fixed all permissions.

while giving command vdomaininfo or vuserinof it does not find the domain.


Hi,

Did you copy over the contents of /var/qmail/control and /var/qmail/users ?

Regards,

Rick


!DSPAM:4c17c03e32717630316849!



RE: [vchkpw] Qmail migration

2010-06-15 Thread Ron Miller
Here is how:

http://qmail.jms1.net/scripts/migrate-domain.shtml

Be sure NOT to use IE. Use Firefox instead.

I have used this script many times.

-Ron

-Original Message-
From: ta...@nayatel.com [mailto:ta...@nayatel.com] 
Sent: Tuesday, June 15, 2010 1:34 PM
To: vchkpw@inter7.com
Subject: [vchkpw] Qmail migration

please suggest

I am migrating Qmail from one Machine to another.Have taken following  
steps but no luck.

1- I have taken dump of Mysql and and restored it on new machine.
2- SCP all Domain and email boxes to new machine.
3- Fixed all permissions.

while giving command vdomaininfo or vuserinof it does not find the domain.




This message was sent using IMP, the Internet Messaging Program.






!DSPAM:4c18194532718214062253!



Re: [vchkpw] Qmail migration

2010-06-15 Thread Nicolas Croiset
- ta...@nayatel.com a écrit :

 please suggest
 
 I am migrating Qmail from one Machine to another.Have taken following 
 
 steps but no luck.
 
 1- I have taken dump of Mysql and and restored it on new machine.
 2- SCP all Domain and email boxes to new machine.
 3- Fixed all permissions.
 
 while giving command vdomaininfo or vuserinof it does not find the
 domain.
 

Hello,

you forget /var/qmail/users/


Bye.
-- 
Nicolas Croiset  - VDL -   ncroi...@vdl.fr

!DSPAM:4c1855bd32719502116462!