Current time: 12-22-2024, 08:50 PM Hello There, Guest! (LoginRegister)


Post Reply 
migrating from one server to another ... bind errors
Author Message
gdav Offline
Newbie
*

Posts: 5
Joined: Apr 2007
Reputation: 0
Post: #1
Rolleyes migrating from one server to another ... bind errors
hi,
I try to migrate from one server to another but I get problems Sad
I searched the complete forum, but I did not found a solution.

- Distribution Debian 6.0 (old server Debian 5.0)
- OS-type 64-bit (old server 32-bit)
- ISPCP ispCP 1.0.7 OMEGA build: 20101124 (old and new server)
- All modifications to your system/ISPCP - spamassasin, maia, amavis
- Root or vServer - root

On the new Server I have tried a clean install following this guide:
http://isp-control.net/documentation/sta...ion/debian

Then I did not followed up this migration guide, becaus I did not want to have all configurations and stuff of the old server:
http://isp-control.net/documentation/how...pcp_server


Instead I tried this steps:

-- Extract a copy of all virtual users, their groups and passwords
server1.de# cat /etc/passwd | grep '^vu.*:' > /root/passwd.vu
server1.de# cat /etc/group | grep '^vu.*:' > /root/group.vu
server1.de# cat /etc/shadow | grep '^vu.*:' > /root/shadow.vu

-- Transfer these files to the new server using scp
server1.de# scp /root/*.vu root@server2.de:/root/

-- Add the info from these files to the new server
server2.de# cat /root/passwd.vu >> /etc/passwd
server2.de# cat /root/shadow.vu >> /etc/shadow
server2.de# cat /root/group.vu >> /etc/group

-- Transfer postfix, courier, proftpd and ispcp configurations to the new server.
server1.de# rsync -az -e ssh /etc/courier/* server2.de:/etc/courier
server1.de# rsync -az -e ssh /etc/postfix/* server2.de:/etc/postfix
server1.de# rsync -az -e ssh /etc/proftpd/proftpd.conf server2.de:/etc/proftpd/
server1.de# rsync -az -e ssh /etc/ispcp/ispcp.conf server2.de:/etc/ispcp/ispcp.conf.old

-- Transfer the ispcp keys and phpMyAdmin config
server1.de# rsync -az -e ssh /var/www/ispcp/engine/ispcp-db-keys.pl server2.de:/var/www/ispcp/engine/
server1.de# rsync -az -e ssh /var/www/ispcp/engine/messenger/ispcp-db-keys.pl server2.de:/var/www/ispcp/engine/messenger/
server1.de# rsync -az -e ssh /var/www/ispcp/gui/include/ispcp-db-keys.php server2.de:/var/www/ispcp/gui/include/
server1.de# rsync -az -e ssh /var/www/ispcp/gui/tools/pma/config.inc.php server2.de:/var/www/ispcp/gui/tools/pma/config.inc.php

-- Extract a copy of all databases
server1.de# mysqldump --all-databases --opt -Qc --add-drop-database -p -r /root/mysqldump.sql

-- Transfer it to the new server
server1.de# scp /root/mysqldump.sql server2.de:/root

-- Import them into the new server mysql
server2.de# mysql -p < mysqldump.sql

-- Change mysql's IP on the new server
server2.de# mysql -p
server2.de# mysql>use ispcp
server2.de# mysql> UPDATE server_ips SET ip_number = "xxx.xxx.xxx.xxx" WHERE ip_id = 1;

-- Mark all domain/subdomains/mail configurations for regeneration (so they work with the new IP)
server2.de# mysql> UPDATE `domain` SET `domain_status` = 'change' WHERE `domain_status` = 'ok' ;
server2.de# mysql> UPDATE `subdomain` SET `subdomain_status` = 'change' WHERE `subdomain_status` = 'ok';
server2.de# mysql> UPDATE `domain_aliasses` SET `alias_status` = 'change' WHERE `alias_status` = 'ok';
server2.de# mysql> UPDATE mail_users SET status="toadd" where status="ok";
server2.de# mysql>quit

open
nano /etc/mysql/debian.cnf

copy password

www-2# mysql -p

mysql> GRANT ALL PRIVILEGES ON * . * TO 'debian-sys-maint'@'localhost'
-> IDENTIFIED BY 'password' // Password copiado de debian.conf
-> WITH GRANT OPTION
-> MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR
-> 0 MAX_USER_CONNECTIONS 0 ;
mysql> quit

/etc/init.d/mysql restart

mysql_upgrade -u root -h localhost -p --verbose --force

/etc/init.d/mysql restart

server2.de# /var/www/ispcp/engine/ispcp-rqst-mngr

-- Transfer websites, mailboxes, logs and cronfiles to the new server
server1.de# rsync -az -e ssh /var/www/virtual/* server2.de:/var/www/virtual
server1.de# rsync -az -e ssh /var/mail/virtual/* server2.de:/var/mail/virtual
server1.de# rsync -az -e ssh /var/log/* server2.de:/var/log
server1.de# rsync -az -e ssh /var/spool/cron/* server2.de:/var/spool/cron

find /etc/apache2 -type f -exec sed -i 's/oldIP/newIP/g' {} \;
find /etc/ispcp -type f -exec sed -i 's/oldIP/newIP/g' {} \;

recreate files and configs:

cd /var/www/ispcp/engine/setup
perl ispcp-update

/etc/init.d/ispcp_daemon start

reboot



Every thing should be fine, but it isn't so.

For every domain the status is not okay.

In the ispCP Debugger are multiple errors shown:

xxx.de - Set status to 'change'
get_file() | [ERROR] File '/etc/ispcp/bind/working/xxx.de.db' does not exist !
...
same for all domains, subdomains and domain aliases.

I tried "Set status to 'change'" and excuted
server2.de# /var/www/ispcp/engine/ispcp-rqst-mngr

perl ispcp-update
Did not thrown an error, the setup log file is okay too.


Has anybody an idea, whats going wrong and how to fix it?
But the error is not fixed.

I looked at /etc/ispcp/bind/working/, but the files did not exists.
04-17-2011 03:42 AM
Find all posts by this user Quote this message in a reply
gdav Offline
Newbie
*

Posts: 5
Joined: Apr 2007
Reputation: 0
Post: #2
RE: migrating from one server to another ... bind errors
okay,
I have found the problem.
The htdocs directory of a subdomain was a broken systemlink.

So the ispcp-rqst-mngr stopped working, after proccessing teh subdomain.

Maybe, there should be an error handler integrated ... Wink
04-18-2011 06:04 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)