migration questions ... again

Discussion in 'Installation/Configuration' started by electronico_nc, Jul 16, 2014.

  1. Sorry to post about this ...

    2 Ubuntu 12.04 (perfect) servers (apache2, bind9, postfix, dovecot, mysql) move from old to new.
    New server is ready with ISPConfig installed.

    From all the readings there:

    1) backup all MySQL databases, insert in new server
    2) from old to new :
    copy lines starting with 'web' in /etc/passwd and /etc/shadow
    copy lines starting with 'client' in /etc/group and /etc/gshadow
    3) directories (to copy with permissions)
    /var/www/
    /var/vmail/
    /var/log/
    /usr/local/ispconfig/server/lib/
    /usr/local/ispconfig/interface/

    /etc/apache2/ssl (certs have been stored there)

    I wonder about:
    /etc/apache2/
    /etc/bind/
    /etc/dovecot/
    /etc/php5/
    /etc/postfix/
    Will files (sites-available, bind zones, ...) be created by ISPConfig ?

    Anything that miss ?
    (no mailman lists)

    There is not enough free space on the old server to tar directories, I'll have to rsync, then shutdown old server (no more access) and change the new server IP.
    So despite I made a tar.gz with /etc, I'm "a bit" afraid to forget something ...

    Thanks a lot for your time.
    Nicolas
     
  2. Sorry to bump ...
    Migration has to be done in a couple of hours.
    Thanks again.
    Nicolas
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Most of these files get setup by the ispconfig installer while you install ispconfig and the vhost files get createf when you run the resync in ispconfig.

    Doing the file sync with rsync is fine as well, jsut ensure to preserve permissions.
     
  4. Well I haven't run resync from ISPConfig, so that's probably why (not seeing any zone created in /etc/bind) I have transfered theses folders from old to new:
    /etc/apache2/
    /etc/bind/
    /etc/dovecot/
    /etc/php5/
    /etc/postfix/
    /etc/ssl/
    /etc/pure-ftpd/
    /var/backup/

    Apache2 refused to start because of a missing geoip module (transfered from old, then OK)

    I had some troubles with automysqlbackup as it uses /etc/mysql/debian.cnf to access MySQL and the 'mysql' database was the one from old server, so debian-sys-maint password was not good.
    So:
    /etc/mysql/debian.cnf
    is to add to directories to backup if a full (--all) mysql dump is used.

    Nicolas
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Many of thes efiles contain details that are unique for ach server setup e.g. the new password of the ispconfig user, thats why they should not be transferred. To fix that, download the ispconfig tar.gz file, unpack it and run the update.php script in the install folder and choose to reconfigure services during update.
     
  6. Well,
    The new server doesn't log anything from Apache2.
    /var/www/domain.tld/log/access.log file is still linked to the migration's day:
    Code:
    lrwxrwxrwx 1 root root   19 Jul 17 00:08 access.log -> 20140717-access.log
    The log directories are not listed in /etc/fstab:
    Code:
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    /dev/mapper/vds2--new--vg-root /               ext4    errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0       1
    # /boot was on /dev/sda1 during installation
    UUID=5a8191cc-a949-429c-9aad-118855290635 /boot           ext2    defaults        0       2
    /dev/mapper/vds2--new--vg-swap_1 none            swap    sw              0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    Should I just manually re-create the entries for website's log in /etc/fstab, remount and restart Apache2 to have logs again ?
    Thanks (once more).
    Nicolas
     
    Last edited: Jul 24, 2014
  7. Yes, logs are back !
     
  8. There is still something wrong with the logs, yesterday is linked to '2-days-ago' date (for each site):
    Code:
    ls -lhtr /var/www/clients/client1/web1/log
    ->
    Code:
    ...
    -rw-r--r-- 1 root root  42M Jul 25 23:59 20140725-access.log
    lrwxrwxrwx 1 root root   53 Jul 26 00:31 yesterday-access.log -> /var/www/clients/client1/web1/log/20140724-access.log
    -rw-r--r-- 1 root root 394K Jul 26 01:08 20140723-access.log.gz
    lrwxrwxrwx 1 root root   19 Jul 26 06:53 access.log -> 20140726-access.log
    -rw-r--r-- 1 root root 1.3M Jul 26 08:01 error.log
    -rw-r--r-- 1 root root 6.4M Jul 26 08:20 20140726-access.log
    Server is well time synched.
    Code:
    Sat Jul 26 08:25:44 NCT 2014
    How could we fix that ?
    Thanks.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe your system timezone and the timezone that you set in the ispconfig config.inc.php files does not match.
     

Share This Page