Hi All! I need moving ISPconfig from Server A to Server B. Server A is a server in production. This must be repaire. I need moving all ispconfig: acounts, emails, passwords, webs... I have backup of Server A: /etc /home/www /var/lib/mysql How can i do it?. I think make: 1- Install software in Server B: postfix, mysql, php, apache, courier, proftpd and others. 2- Install a new ISPconfig 3- Replace the files /etc /home /var/lib/mysql Is it correct? I can't install a software for backup. I only can use scp or rsync. Regards,
Make a backup of /etc/passwd, /etc/shadow, /etc/group, Vhosts_ispconfig.conf, /etc/postfix/local-host-names, /etc/postfix/virtusertable, named.conf, all the pri.* zone files, /etc/proftpd*.conf. Also create sql dumps of your MySQL databases (either with phpMyAdmin or on the command line: http://www.howtoforge.com/faq/6_3_en.html ) and make a backup of /home/www on the old server: Code: cd /home tar -pczf www.tar.gz www/ Stop Postfix: Code: /etc/init.d/postfix stop If you use mbox, also make a backup of /var/spool/mail: Code: cd /var/spool tar -pczf mail.tar.gz mail/ If you use Maildir, the mailboxes are included in www.tar.gz. On the new server: First install ISPConfig. Create the databases from the sql dumps (either with phpMyAdmin or like this: http://www.howtoforge.com/faq/6_4_en.html ). Also replace the ISPConfig database with the old one. Regarding the mysql database: have a look at the users and db table and add the user /db lines that don't exist on the new server but on the old server. Copy local-host-names and virtusertable to /etc/postfix; open local-host-names and replace the old hostname with the new one. Run Code: postmap /etc/postfix/virtusertable and restart Postfix. Replace Vhosts_ispconfig.conf with the one from the old server; then open it and replace the old IP address with the new one. Transfer www.tar.gz to /home and unpack it: Code: cd /home mv www www_orig tar xvfz www.tar.gz If you had to make a backup of /var/spool/mail, transfer mail.tar.gz to /tmp and do this: Code: cd /tmp tar xvfz mail.tar.gz cd mail cp -pf web* /var/spool/mail/ Have a look at your backups of /etc/passwd, /etc/shadow and /etc/group and add the lines that don't exist in these files on the new server to /etc/passwd, /etc/shadow and /etc/group on the new server. Transfer named.conf and all pri.* files to the new server. Also all proftp*.conf files; open them and replace the old IP address with the new one - also do this with the file names of the proftpd*.conf files. Restart ProFTPd: Code: /etc/init.d/proftpd restart Restart Apache: Code: /etc/init.d/apache restart Log in to ISPConfig and go to Management -> Server -> Settings and change the IP address(es) there. Then go to the DNS Manager and also changes the IP addresses in the DNS records, if necessary. On the old server, create a Postfix transport now so that all emails are forwarded to the ne server (for the time until the MX records of your domains have switched to the new server): Code: echo "* smtp:[[I]<IP address of new server>[/I]]" >> /etc/postfix/transport postmap /etc/postfix/transport /etc/init.d/postfix restart On the new server, open /etc/postfix/local-host-names and add the hostname of the old server at the bottom so that the new server accepts the forwarded mails. Lots of steps to do... (if you want, you can have Till and me do that, but it's not free. Have a look here: http://www.ispconfig.org/support.htm ).
your explanation worked all too beautiful for me, but I have one problem left: now root is the owner of /var/www and thats not ok. whats the easiest way to change back? could I not modify something in the ispconfig panel and click save - would that modify the sites ownership? I could not get the part with /etc/passwd and /etc/shadow done before unpacking stuff (otherwise the ownership would have been preserved I guess) whats the quickest way? to unpack again?
Did you do this on your old server? Code: cd /var tar -[B][COLOR="Red"]p[/COLOR][/B]czf www.tar.gz www/ The p keeps the permissions and owners of all included files and directories.
of course not. that was the problem. ok, now that I don't have the original information I guess I will do the reinstall again, add sites, users and stuff manually and then only copy the really needed material into the subfolders... thx for the help, your howto move from one server to another is great one juts has to be able to read to get it done ;-)
"Also create sql dumps of your MySQL databases (either with phpMyAdmin or on the command line: http://www.howtoforge.com/faq/6_3_en.html )" Is there a way to make a backup of the customer sql satabase if they have a password that you dont know from the command line. ie if I have 50 customers all with a sql database I dont want to have to type in the command line 50 times and find out what password they have. Any thoughts
well I just used root and my rootmysql password, I do not know any clients passwords... if thats what you mean...
If there's two IP where's ISPConfig server, like LAN:192.168.123.200 and WAN:87.116.136.92 LAN:192.168.123.201 and WAN:87.116.136.92 is it necessery that new production server is at the same LAN IP? Once when it is setup, and when all of the backup data is transfered onto him?
You can change the IP address as described here: http://www.howtoforge.com/forums/showthread.php?t=2760
What to do if this is situation: FedoraCore4 - old server phpMyAdmin 2.6.4-pl3, MySQL 4.1.16 Debian Sarge - new server phpMyAdmin 2.6.4-pl3, MySQL 4.0.24_Debian-10sarge1-log And importing of database backup creates: MySQL said: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8 AUTO_INCREMENT=3' at line 31
You can try to update MySQL to version 4.1 on your Debian system. There are official Sarge packages for MySQL 4.1 Code: apt-get install mysql-server-4.1 mysql-client-4.1 libmysqlclient14-dev
MySQl is resolved using http://www.dotdeb.org/mirrors and MySQL 5 I do hope package is stable. --------------------------------------------------- But, postfix? OS and ISPConfig re-installed. Question obsolete at this moment. Websites added manually through ISPConfig. MySQL imported through PHPMyAdmin.
No, I don't have to change LAN IP. In past few days I am moving websites back and forth between two servers. WAN IP is same for both.
is there an easier, more foolproof way to migrate my server to a new one? I get a new one as I had severall RAM failures on the old machine. So I will have 2 PCs in parallel. I would like to "clone" the whole setup to the new machine, can you give me a link to the best suited tutorial? I know there are severall on the howtoforge site maybe you can suggest one? ###edit### I forgot to mention one additional detail: the new serevr will have 2 harddisks, so I could start using software raid...
First I thought you could use Systemimager to move your system to the new server, but if you want to use Software RAID this doesn't work. Then you have to do it manually... BTW, here's a nice tutorial on how to set up software RAID on a server remotely (in German): www.debiandox.de
wow. that looks like a very detailed howto, and after a quick glance it looks like I could use it with one of stratos servers too. U guess after following that tutorial, I can start reading this tutorial about moving ispconfig again I'll keep you updated on my progress
I found another how-to this time specially for Strato and not 1&1: http://www.hotzeltopf.de/anleitungen/debian-sarge-auf-strato-mr2-server-mit-raid1-auf-amd-chipsatz I followed it and everything runs smoothly, now I have to clone my old system. What would be the easiest way? Shall I follow the http://www.howtoforge.com/howto_linux_systemimager howto? Or do you suggest another way? I want to have a clone, then send an email to the site owners I host, to change their IP in the DNS where they manage their sites, so we can just hop onto the new server. ###edit### please keep in mind, that I want to synchronize a server running on interl to the enw one running on AMD and having setup software raid on the new one also I would like not to have to configure all applications like postfix, apache2 ispconfig again, except for the samll changes in hsotnames and IP - any chance to do that?
The debiandox tutorial works also for Hetzner, I've tested that. I guess it will also do for Strato. I guess SystemImager will not work because your device names are now /dev/md0, /dev/md1, etc. on your new server and probably /dev/hda1 or /dev/sda1 or similar on the old one. I recommend to move the data manually. It's a lot of work, but afterwards you can be sure everything works the way you want it.