Current time: 12-23-2024, 01:58 PM Hello There, Guest! (LoginRegister)


Post Reply 
Migrating from CentOS to Debian
Author Message
olindata Offline
Junior Member
*

Posts: 20
Joined: Sep 2009
Reputation: 0
Post: #1
Migrating from CentOS to Debian
Hi Guys,

I have ispCp installed on a CentOS 5.5 server, and have had nothing but trouble since the very beginning (list is too long to even get started Sad ). I'm so sick and tired of it, that I'm thinking of setting up a new server with debian on it, as that seems to be better supported for ispCP.
My hosting provider allows me to have the ip that is now on the CentOS machine come up on the Debian machine.

My question is: what do I need to do to make all of this work on the new system as well? Here's things I am worried about:
a) Do I need to create the same vu20* users on the new box and make sure the same sites are running under the same users?
b) Do I need to change something on the database side? My DB server runs separately, so I can just connect the new machine to the old database.

I know this is a risky operation, but I feel forced since the CentOS install just keeps giving me trouble Sad
05-31-2010 06:46 PM
Find all posts by this user Quote this message in a reply
mr.x Offline
Development Team
*****
Dev Team

Posts: 232
Joined: Nov 2006
Reputation: 3
Post: #2
RE: Migrating from CentOS to Debian
Hi,
(05-31-2010 06:46 PM)olindata Wrote:  a) Do I need to create the same vu20* users on the new box and make sure the same sites are running under the same users?

Just take care that the users in the DB and the users on your system are the same. Its the easiest way to have the same users and groups. just rsyn your passwd and group file

Quote:b) Do I need to change something on the database side? My DB server runs separately, so I can just connect the new machine to the old database.

Set all the domain, aliases and mail settings to "toadd" when you run the request manager on debian.

An urgent point is backup of the key files. You will find a lot to this topic in the README under the topic update.

/Mr.X
05-31-2010 10:10 PM
Find all posts by this user Quote this message in a reply
rethus Offline
Junior Member
*

Posts: 202
Joined: May 2009
Reputation: 3
Post: #3
RE: Migrating from CentOS to Debian
(05-31-2010 06:46 PM)olindata Wrote:  My question is: what do I need to do to make all of this work on the new system as well? Here's things I am worried about:
a) Do I need to create the same vu20* users on the new box and make sure the same sites are running under the same users?
b) Do I need to change something on the database side? My DB server runs separately, so I can just connect the new machine to the old database.

a) jes, that would make thinks much easyer, cause the user are also stored in the ispcp DB, and need to be simlar with the physicaly one
I suggest: Use rsync to copy the data to the new machine, change the owner:grp for each user and have a try.

TIPP: There are a CLI Script in the wiki.. with it u can rechange the user-settings of a domain-account automaticly like it set in the DB. Have a look here:WIKI
There is the file domain.php, look into this file... there is a switch/case/ section for Parm --fix_htdocs_owner this makes all the stuff...

use it like this:
Quote:/usr/bin/php domain.php --domain test.com --action fix_htdocs_owner
should work.

b)Still i now, you don't need to change anything on db-side, such long u use the same ip.

TIP: It could be a little bit difficult to switch to another server, which has the same ip, cause u can't do any testing before switching the DNS to the new Server. Be aware if both servers with same ip are at the same time online, may cause in bad side-effects with cconffusing results.
(This post was last modified: 06-09-2010 08:17 PM by rethus.)
06-09-2010 08:09 PM
Find all posts by this user Quote this message in a reply
Zothos Offline
Release Manager
*****
Dev Team

Posts: 1,262
Joined: Feb 2007
Reputation: 10
Post: #4
RE: Migrating from CentOS to Debian
we also have a backup and restore script located in a branch: http://isp-control.net/ispcp/browser/bra...p-restore. If the amount if pages isnt that huge, this may also help you.
06-09-2010 08:22 PM
Find all posts by this user Quote this message in a reply
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #5
RE: Migrating from CentOS to Debian
got a good solution for you

1. Make fresh installation of ispcp on the new servers but use the same mysql-root-pw and vftp, pma passwords (this makes it much easier)

2. following files are needed to rsync to the new server into a backup-folder

/etc/passwd
/etc/group
/etc/ispcp <- whole folder
/var/www/ispcp/engine/ispcp-db-keys.pl
/var/www/ispcp/engine/messenger/ispcp-db-keys.pl

now rsync /var/www/virtual, /var/log/, /var/mail
mysqldump -uroot -p --all-databases > mysqldump.sql
and rsync the dump-file

3. now backup the new files of the new server into another backup-place
/etc/passwd
/etc/group
/etc/ispcp <- whole folder
/var/www/ispcp/engine/ispcp-db-keys.pl
/var/www/ispcp/engine/messenger/ispcp-db-keys.pl

take a look into the old passwd & group files, there are some vu20xx users and groups. Add them into the new one. Copy the whole entry from passwd into passwd~, also group-file.

4.
make a mysqldump from new server
restore the mysqldump from old server

5. login into the pma and add a user
the username and password you'll find in /etc/mysql/debian.cnf
the user should've the same rights as the root-users has
(this step is really important, if the user doesn't exists the mysqldaemon wouldn't start again) try to restart the mysql daemon before rebooting the system.
Replace the Server-IP with the new one (if it changes)

6. now copy the backuped files from old server
/var/www/ispcp/engine/ispcp-db-keys.pl
/var/www/ispcp/engine/messenger/ispcp-db-keys.pl
into the right place

7. check the file permissions on /var/mail/virtual
should be vmail.mail if not, change it.

8. run regeneration-progress (docu will show u how to do, but change status to 'toadd')


if everything worked fine, the ispcp should regenerate everything on the new server without having any problem.
(This post was last modified: 08-06-2010 01:14 AM by MasterTH.)
08-06-2010 01:09 AM
Find all posts by this user Quote this message in a reply
olindata Offline
Junior Member
*

Posts: 20
Joined: Sep 2009
Reputation: 0
Post: #6
RE: Migrating from CentOS to Debian
Thanks for that answer. I still haven't gotten around to moving, but this might make it easier indeed. It should probably be on the wiki as well? Has it been tested?
08-06-2010 03:10 PM
Find all posts by this user Quote this message in a reply
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #7
RE: Migrating from CentOS to Debian
i already made migrations like this.
thats the way i figured out.

but feel free to add this into the wiki
(This post was last modified: 08-06-2010 03:15 PM by MasterTH.)
08-06-2010 03:15 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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