Moving sites from A to B server.

Discussion in 'General' started by sv102, Feb 17, 2016.

  1. sv102

    sv102 New Member

    Hello! how can I migrate my sites from one server to another? Is there any manual? (Debian 8, Ispconfig3)
  2. Active Member

    With special attention to copy /etc/passwd and groups before extracting data on target system.
    In theory copying apache vhost files isn't needed since you can let ISPConfig recreate them by using rsync option at the tools page.

    But yeah, setting up just like you did before, move files and database ( including mysql database ) do rsync let the cronjob do it's thing and you should be ready to go again.
  3. Jesse Norell

    Jesse Norell Active Member

    DDArt likes this.
  4. sv102

    sv102 New Member

    I want to move only 1-2 websites.

    I'm on the new server created new webdomain (name in isponfig panel. Use ssh on new server:
    cd /var/www/
    ls -l
    I see:
    drwxr-xr-x  2 web2 client1 cgi-bin
    drwxr-xr-x 16 web2 client1 log
    drwx--x---  2 web2 client1 private
    drwxr-xr-x  2 web2 client1 ssl
    drwxrwx---  2 web2 client1 tmp
    drwx--x--x 21 web2 client1 web
    drwx--x---  3 web2 client1 4096 май  2  2015 webdav
    And use rsync ( - old server) and mysqldump:
    rsync -og --chown=web2:client1 -avz -e ssh [email protected]:/var/www/ /var/www/
    mysqldump -h -u root -p site-bd > site-bd.sql
    scp site-bd.sql [email protected]:/var/www/
    mysql -h hostname -u username -p site-bd < site-bd.sql
    But i see on webpage error
    ERROR 500 - Internal Server Error!:(:(:(
    I'm doing this for the first time.
  5. Active Member

    Do tail -f log/error_log in /var/www/ directory and request page, what's getting added to the logfile?
    sv102 likes this.
  6. sv102

    sv102 New Member

    /var/www/ mkdir log/error_log.log
    /var/www/ nano log/error_log.log                    #save clean and exit
    /var/www/ tail -f log/error_log.log
    open on browser and see file error_log.log
    But error_log.log is clean:(
  7. Active Member

    oh well, I'm sorry - I made a typo.
    I meant error.log - it should be in place within log folder with no need to create it.
    sv102 likes this.
  8. sv102

    sv102 New Member

    [email protected]:/var/www/ nano error.log
    [Mon Feb 22 10:35:03.478050 2016] [:error] [pid 2064] [client] terminate called after throwing an instance of '
    [Mon Feb 22 10:35:03.478134 2016] [:error] [pid 2064] [client] suPHP::LookupException
    [Mon Feb 22 10:35:03.478147 2016] [:error] [pid 2064] [client] '
    [Mon Feb 22 10:35:03.478278 2016] [core:error] [pid 2064] [client] End of script output before headers: index.php
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you chown the files to the right user and group on the new server? And you should not use the deprecated suphp, better use php-fpm or fastcgi + suexec.
    sv102 likes this.
  10. sv102

    sv102 New Member

    You helped!:)
    1. Created domain in ispconfig on new server (use php-fpm or fastcgi)
    2. Copy web and database
      rsync -og --chown=web2:client1 -avz -e ssh [email protected]:/var/www/ /var/www/
      mysqldump -h -u root -p site-bd > site-bd.sql
      scp site-bd.sql [email protected]:/var/www/
      mysql -h hostname -u username -p site-bd < site-bd.sql
      check phpmyadmin
    3. Changed settings joomla configuration file
      [email protected]:/var/www/ nano configuration.php
      $db, $user, $password and other
    Thank you all! :):):)

Share This Page