Personal tools
Views

User Handbook/Installation/Copying To a New Server

From CMSMS

This page in: English - Deutsch - Français - Svenska - Русский - Norsk - Polski - Nederlands - Español - Lietuvių

Copying To a New Server

So you got a brand new server and need to copy your old site to a new server?

basic steps are easy:

  1. clear cache in admin and log out
  2. copy all files and directories from old server to new server
  3. dump database from the old server
  4. insert dump to new database
  5. edit config.php to match the new server
  6. check permissions against Install instructions
  7. enjoy

Small Howto

In this howto path to pages is /var/www/cmsmadesimple and username for the database is USER, password is PASS and database host is HOSTNAME. ssh is used to connect to servers and sftp to move files between. old server means the original and new server is the target server.

  • clear the cache from the admin (and maybe set a site down message)
  • ssh to old server
  • create tar ball of the files (without tmp/) and database
    • cd /var/www/cmsmadesimple/
    • mysqldump -uUSER -hHOSTNAME -p DATABASE > dump.sql
    • cd ..
    • tar -zcf backup.tar cmsmadesimple/*
  • copy tarball to new server
    • sftp USER@NEWSERVER
    • put backup.tar
  • close connection to old server (the old server still works like it used to as nothing has been modified there)
  • open connection to new server (the copied file most probably is in your $HOME so lets copy it to right place)
    • cp backup.tar /var/www/
    • cd /var/www/
    • tar -zxf backup.tar
    • cd cmsmadesimple
    • mysql -uUSER -hHOST -p DATABASE < dump.sql (after this you can delete dump.sql)
    • FAVORITEEDITOR config.php
  • you need to change database settings and all paths (in this example paths are the same for both servers)
  • verify the tmp/ and tmp/cache folders are empty, writeable and belong to the correct user.
  • login to new server admin and clear cache and unset site down message


Hopefully everything works!


This page in: English - Deutsch - Français - Svenska - Русский - Norsk - Polski - Nederlands - Español - Lietuvių