PDA

View Full Version : Moving ISPConfig3 from Ubuntu to Debian


itsnedkeren
11th January 2010, 14:28
Hi.

I want to move all my server contents from Ubuntu to Debian. I have tried searching the forums for a solution to this. But all I find is and old thread for ISPConfig2, which does not seem to be valid for ISPConfig3.

Can someone please tell me step-by-step what to do? I'm running latest version of ISPConfig3.

Thanks in advance for any assistance :)

dexter1983
11th January 2010, 15:32
at folowing link you will find more info:

http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3

itsnedkeren
11th January 2010, 16:06
at folowing link you will find more info:

http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3

That's the guide for installing ISPC3 on Debian. What I want to know is how to move an existing ISPConfig3 installation from one system to another, in this case from Ubuntu -> Debian.

Thanks anaway though :)

itsnedkeren
12th January 2010, 15:29
Anyone know how to do this?

falko
13th January 2010, 14:03
I'm sorry, I've never tried this.

itsnedkeren
19th June 2010, 23:50
Sorry for reviving this old thread, but now I really need to do this.

Is there anyone with experience or knowledge out there who can point me in the right direction please?

Thanks for any help.

EDIT: I have a Debian server running and ready, with freshly installed ISPConfig3 on.

/Jim

till
20th June 2010, 17:42
There should be no difference if you move from debian to debian or from ubuntu to debian.

1) Install ispconfug 3 on the debian server. It has to be the same version then on the old server.
2) copy all lines of the web* users from /etc/passwd and /etc/shadow to the new server.
3) copy all lines of the client* groups from /etc/group and /etc/gshadow to the new server.
4) Move the directories /var/www and /var/vmail to the new server (with preserved permissions).
5) copy the ispconfig database to the new server.
6) copy the website databases to the new server. Then copy the user and db entrys for the client databases from the mysql.dser and mysql.db database tables to the new system.

itsnedkeren
21st June 2010, 21:36
There should be no difference if you move from debian to debian or from ubuntu to debian.

1) Install ispconfug 3 on the debian server. It has to be the same version then on the old server.
2) copy all lines of the web* users from /etc/passwd and /etc/shadow to the new server.
3) copy all lines of the client* groups from /etc/group and /etc/gshadow to the new server.
4) Move the directories /var/www and /var/vmail to the new server (with preserved permissions).
5) copy the ispconfig database to the new server.
6) copy the website databases to the new server. Then copy the user and db entrys for the client databases from the mysql.dser and mysql.db database tables to the new system.

Thanks a lot, I'll give it a go :)

dpejic
1st July 2010, 11:54
Please if anyone knows which way to do it, or some links that would help me. Thanks in forward

till
1st July 2010, 12:58
See post #7 of this thread.

Sinchan
2nd July 2010, 15:56
5) copy the ispconfig database to the new server.

do you mean copy folder ispconfig in /var/lib/mysql till? i suggest to shutdown mysqld first if database is opened.

till
2nd July 2010, 15:59
I meant to dump the database with the mysqldump command into a file and then import it on the new server.

In general: Copying of folders in /var/lib/mysql works only for databases in myisam format and not for databases in the new innodb format.

Sinchan
2nd July 2010, 16:12
okay till thanks to clarify. its more clearly now :)

itsnedkeren
5th November 2010, 04:59
It seems to be working, but after the move, none of my mails are showing in Squirrelmail or Roundcube :(( I get new mails in fine, and can send as well. But my 500+ mails are not showing :( They are located under /var/vmail under my folder.



Please help.

Thanks
Jim

mail.err
Nov 5 03:15:14 node01 postfix/trivial-rewrite[7896]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:15:16 node01 postfix/trivial-rewrite[7897]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:16:17 node01 postfix/trivial-rewrite[7904]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:17:18 node01 postfix/trivial-rewrite[7929]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:18:19 node01 postfix/trivial-rewrite[7941]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:19:20 node01 postfix/trivial-rewrite[7952]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:19:21 node01 postfix/trivial-rewrite[7954]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:20:21 node01 postfix/trivial-rewrite[8016]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Nov 5 03:20:51 node01 dovecot: auth-worker(default): mysql: Connect failed to localhost (dbispconfig): Access denied for user 'ispconfig'@'localhost' (using password: YES) - waiting for 1 seconds before retry

I have fixed the access denied for localhost, so that's not the problem

EDIT: I don't recall "dovecot" from my "old" system, can that have something to do with this???

EDIT2: See picture attachment, for some reason my current mail setup looks in the "MailDir" folder and not in the root of the account.

EDIT3: I also changed from Courier to Dovecot in the ISPConfig admin, still same problem.

.

falko
5th November 2010, 15:17
Please try imapsync to move your emails: http://www.howtoforge.com/how-to-migrate-mailboxes-between-imap-servers-with-imapsync

itsnedkeren
5th November 2010, 16:21
Please try imapsync to move your emails: http://www.howtoforge.com/how-to-migrate-mailboxes-between-imap-servers-with-imapsync

That would require me to know the users passwords, which I don't. Is there no other way around this? Can't I install Courier again instead of dovecot??

Thanks

itsnedkeren
6th November 2010, 01:06
Following this -> http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3-p3 from number 9 and installed courier again, everything is working and as a side note, performance IS MUCH BETTER with courier.

Is there anything I should be aware of doing this? How do I make sure that Dovecot is completely removed?

I have run: apt-get remove dovecot

but it states that it is not present, but I can run /etc/init.d/dovecot start|stop with success :s

Thanks again.

falko
6th November 2010, 15:14
Try
apt-get purge dovecot

itsnedkeren
8th November 2010, 09:01
Try
apt-get purge dovecot


node01:~# apt-get purge dovecot
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package dovecot is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
node01:~#


Still able to execute:


node01:~# /etc/init.d/dovecot start
node01:~# /etc/init.d/dovecot stop
node01:~#

Thanks again.

falko
9th November 2010, 15:51
Try
apt-get --purge remove dovecot

itsnedkeren
9th November 2010, 17:26
Try
apt-get --purge remove dovecot


I find this very odd hehe :D


node01:~# apt-get --purge remove dovecot
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package dovecot is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
node01:~# /etc/init.d/dovecot start
node01:~# /etc/init.d/dovecot stop
node01:~#

falko
10th November 2010, 08:48
What's in /etc/init.d/dovecot?

itsnedkeren
11th November 2010, 19:46
What's in /etc/init.d/dovecot?


This is the contents:


#! /bin/sh
### BEGIN INIT INFO
# Provides: dovecot
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs $time ntp
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Dovecot init script
# Description: Init script for dovecot services
### END INIT INFO

# Author: Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian GNU/Linux
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="IMAP/POP3 mail server"
NAME=dovecot
DAEMON=/usr/sbin/dovecot
DAEMON_ARGS=""
SCRIPTNAME=/etc/init.d/$NAME
CONF=/etc/dovecot/${NAME}.conf

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Exit if the configuration file doesn't exist
[ -f "$CONF" ] || exit 0

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

# cong file readable?
if [ ! -r ${CONF} ]; then
[ "$VERBOSE" != no ] && log_daemon_msg "${CONF}: not readable" "$NAME" \
&& log_end_msg 1;
exit 1;
fi

# The init script should do nothing if dovecot or another imap/pop3 server
# is being run from inetd, and dovecot is configured to run as an imap or
# pop3 service
for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
/etc/inetd.conf`
do
for q in `sed -r "s/^[ \t]*protocols[ \t]*=[ \t]*(([^\"]*)|\"(.*)\")/\2\3/;t;d" \
${CONF}`
do
if [ $p = $q ]; then
exit 0
fi
done
done

# determine the location of the PID file
# overide by setting base_dir in conf file or PIDBASE in /etc/defaults/$NAME
PIDBASE=${PIDBASE:-`sed -r "s/^[ \t]*base_dir[ \t]*=[ \t]*([^ \t]*)/\1/;t;d" ${CONF}`}
PIDFILE=${PIDBASE:-/var/run/dovecot/}master.pid

#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name ${DAEMON##*/}
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --pidfile $PIDFILE --name ${DAEMON##*/}
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}

#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}


case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
reload|force-reload)
log_daemon_msg "Reloading $DESC" "$NAME"
do_reload
log_end_msg $?
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac

exit 0

falko
12th November 2010, 15:16
Do /usr/sbin/dovecot and /etc/dovecot/dovecot.conf exist?

itsnedkeren
12th November 2010, 20:56
Do /usr/sbin/dovecot and /etc/dovecot/dovecot.conf exist?



node01:~# cat /usr/sbin/dovecot
cat: /usr/sbin/dovecot: No such file or directory


/etc/dovecot/dovecot.conf does exist though.


node01:~# ls -la /etc/dovecot/
total 176
drwxr-xr-x 2 root root 4096 2010-11-05 23:34 .
drwxr-xr-x 95 root root 4096 2010-11-12 16:23 ..
-rw-r--r-- 1 root root 45551 2010-11-05 23:34 dovecot.conf
-rw-r--r-- 1 root root 45568 2010-11-05 03:20 dovecot.conf~
-rw-r--r-- 1 root root 45557 2010-11-05 23:34 dovecot.conf.bak
-rw------- 1 root root 4621 2009-09-23 13:12 dovecot-ldap.conf
-rw------- 1 root root 5127 2010-11-05 21:52 dovecot-sql.conf
-r-------- 1 root root 5127 2010-11-05 03:20 dovecot-sql.conf~



Thanks again.

falko
13th November 2010, 13:14
I don't know why it didn't remove the other Dovecot files, but the most important thing is that /usr/sbin/dovecot is gone, so Dovecot cannot be started anymore.

itsnedkeren
13th November 2010, 15:32
I don't know why it didn't remove the other Dovecot files, but the most important thing is that /usr/sbin/dovecot is gone, so Dovecot cannot be started anymore.

Thanks for your assistance, much apprecited. I'll leave it at that :)