Manually migrate Magento to Hypernode

in Migration Tags: MagentoMigrationMySQLService panelSSH

If for some kind of reason the importer-script doesn’t work for you (you might use a module that the importer-script isn’t compatible with) you can also migrate your site to Hypernode manually. Follow the next steps to manually migrate Magento to Hypernode.

NB: If you set some environment variables, you can follow along these instructions by copy-pasting most of the commands in this document to the command line. E.g.:
  1. Login to your Hypernode using SSH.
    ssh app@$NODE
  2. Make sure you can login to your current domain from there.
    ssh $CURRENT_SSH
  3. Synchronize all files to the hypernode using rsync
    rsync -a --exclude=/var/\*/\* --delete $CURRENT_SSH:$DOMAIN/ /data/web/public

    For subsequent runs, you can prevent your xml files from being overwritten by adding --exclude=\*.xml . If you’re using Extendware modules, make sure you don’t exclude the var/extendware folder.

  4. Enter /data/web/public, all subsequent steps will assume you are in it.
    cd public
  5. Fix all broken absolute symlinks in the site. You can find them using find:
    find . -type l -xtype l
    modman repair
  6. Change the database host in the local configuration to use the hypernode database server, called ‘mysqlmaster’:
    sed -i "s/$(n98-magerun db:info host)/mysqlmaster/" app/etc/local.xml
  7. Create the local database user
    DBUSER=$(n98-magerun db:info username)
    DBPASS=$(n98-magerun db:info password)
    DBNAME=$(n98-magerun db:info dbname)
    echo "CREATE DATABASE $DBNAME" | mysql
  8. Copy the database:
    ssh $CURRENT_SSH "n98-magerun --root-dir=$DOMAIN db:dump --strip='@stripped' --stdout" | n98-magerun db:console
  9. Remove memcache configuration from app/etc/local.xml and fix redis configuration in app/etc/local.xml and app/etc/fpc.xml.In app/etc/local.xml the cache configuration should look like this:

    And if you have FPC configured, app/etc/fpc.xml should look like this:

  10. Check for hardcoded paths in files and fix them manually. You can find them using:
    grep -r /home/users .
  11. Flush cache, just to be sure 🙂
    n98-magerun cache:flush
  12. Convert the apache configuration you might have done in .htaccess-files to nginx configuration, see this manual for some hints.
  13. Test your site by creating one or more DNS CNAME records to your hypernode and configuring base urls for them, or by temporarily adding entries to your local hosts file.
  14. Copy your cronjobs. More information can be found in Configure cronjobs on Hypernode.

Done? Now it’s time to check if everything works as it should!