Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2005
    Location
    Kozani - Greece
    Posts
    58

    Upgrading a CMS in a VPS

    Hello, we have a VPS and we would like to upgrade a site that we have with e107 CMS but we would like to test first the upgraded version on-line and then move it on-line.

    We use cpanel/WHM

    I have thought the following proceedure and i would like your opinion.

    let's asume we have the www.mmingos.com with account name mmingos in the vps.

    1. create a new account on the vps named mmingos2
    2. copy all files from account mmingos to mmingos2 via shell
    3. update the config file of mmingos2 to connect to the new databases and because the new mmingos2 site doesn't have a dns, the config file will be updated to be www.myvpsserver.com/~mmingos2 instead of / which was before for www.mmingos.com
    4. upgrade the CMS software and if everything is ok then :
    1. connect www.mmingos.com with my new mmingos2 account on the vps

    Questions :
    1. can i change the dns entry for mmingos.com to connect to mmingos2 instead of mmingos account on the VPS and how ?
    2. when i copy the whole home dir of mmingos to mmingos2 will there be any problem in the mysql database ? Because if I have mmingos_db for mmingos account and copy it to mmingos2 there will be a conflict in the names.
    3. do you propose an easier way to do it ?

  2. #2
    Join Date
    Oct 2006
    Posts
    50
    why dont u test in a subfolder like www.mmingos.com/test?

  3. #3
    Join Date
    Jun 2006
    Location
    Cheshire, UK
    Posts
    67
    Quote Originally Posted by mmingos
    Questions :
    1. can i change the dns entry for mmingos.com to connect to mmingos2 instead of mmingos account on the VPS and how ?
    2. when i copy the whole home dir of mmingos to mmingos2 will there be any problem in the mysql database ? Because if I have mmingos_db for mmingos account and copy it to mmingos2 there will be a conflict in the names.
    3. do you propose an easier way to do it ?
    1) DNS Wouldn't work based on the information that you provided. A simple meta-refresh page will work fine.

    2) Providing the database is visible by that account, which it should be, moving the home directory will cause no problems. Just ensure that any paths to your connection scripts (if you use dreamweaver) are valid.
    Carl Pickering, Line3 Internet
    http://www.line3.co.uk
    UK VPS Provider; 99.98% uptime

  4. #4
    Join Date
    Jun 2006
    Location
    Cheshire, UK
    Posts
    67
    EDIT:

    I believe CPanel, ties the DB's to the appropriate accounts on the VPS. You may need to export it, and import it under a new db name in CPanel..

    I'm sure someone will be kind to correct me if I am wrong
    Carl Pickering, Line3 Internet
    http://www.line3.co.uk
    UK VPS Provider; 99.98% uptime

  5. #5
    Join Date
    Jan 2005
    Location
    Kozani - Greece
    Posts
    58
    maybe konstantinos is correct, i should test a subfolder.
    what i wanted is an easy way to test the new cms version over my current version, without touching the on-line site and if everthing was ok, just change to the new CMS without other hassle.

    if i copy my sites files in /test and then make a copy of the db and connect the /test with the copy of the original db... then upgrade. let's say that the site works fine in /test. WHat should i do next? do the upgrade AGAIN to the main directory ?

    (by the way how do you make easily a copy of the db via phpmyadmin ?)

  6. #6
    Join Date
    Jun 2006
    Location
    Cheshire, UK
    Posts
    67
    Quote Originally Posted by mmingos
    maybe konstantinos is correct, i should test a subfolder.
    what i wanted is an easy way to test the new cms version over my current version, without touching the on-line site and if everthing was ok, just change to the new CMS without other hassle.

    if i copy my sites files in /test and then make a copy of the db and connect the /test with the copy of the original db... then upgrade. let's say that the site works fine in /test. WHat should i do next? do the upgrade AGAIN to the main directory ?

    (by the way how do you make easily a copy of the db via phpmyadmin ?)
    In PHPMyAdmin, click on the 'house' icon on the left hand side, and you'll see in the right, something that says 'export', ensure that all all the options under 'DATA' is ticked. Then click 'save as file' this will download an SQL file to your machine, depending on your db size.

    When you create a new DB, click on the root db in PHPMyAdmin and then click upload in the SQL box. This will allow you to upload the SQL file, run the query and create a copy of the DB.

    If you do a copy to /test, you will need to make any changes to config files to reflect on this path, ie if your using Joomla, Drupal, PHPNuke etc.. They have a central config file which contains paths, make sure these relfect the changes otherwise you'll get depending on the package cryptic or easy to understand error messages.
    Also make sure that it contains your new DB information. You can then run the upgrade if you wish
    Last edited by L3-Carl; 12-12-2006 at 10:35 AM.
    Carl Pickering, Line3 Internet
    http://www.line3.co.uk
    UK VPS Provider; 99.98% uptime

  7. #7
    Join Date
    Jan 2005
    Location
    Kozani - Greece
    Posts
    58
    well i was talking about a database copy (backup) without downloading any files. 'cause my database is pretty big, about 80mb.

    Can you just create a copy of a database in seconds within phpmyadmin, without using download/upload ?

  8. #8
    Join Date
    Jun 2006
    Location
    Cheshire, UK
    Posts
    67
    Not that I am aware of. No..

    You can do this on the command line, but you would need to know Linux in order to do this..

    There are some freeware tools that will allow you to connect and duplicate a DB, but PHPMyAdmin does not have this ability
    Carl Pickering, Line3 Internet
    http://www.line3.co.uk
    UK VPS Provider; 99.98% uptime

  9. #9
    Join Date
    Oct 2006
    Posts
    50
    when u are happy with the cms upgrade you can either redo the ugrade in the root which is your original site or u can copy all files from test folder to the root overwriting the old ones. after u do that simply change the config for the new cms to connect to the test db which is upgraded ok and u are all set. u can backup databases via ssh using

    mysqldump --opt -Q -u dbusername -p databasename > /path/to/backupname.sql

    usually a folder NOT in the public_html so nobody can assess. se backup your cms db like this and after u create the test db for the upgrade it load the dump by using

    mysql -u dbusername -p databasename < /path/to/backupname.sql

    after u do that run the upgrade script of the cms which in my example is at www.mmingos.com/test?

    actually i use the same command to do daily backups of all my dbs via cron job fron cpanel cron settings
    Last edited by konstantinos; 12-12-2006 at 11:43 AM.

  10. #10
    Join Date
    Jan 2005
    Location
    Kozani - Greece
    Posts
    58
    thanx a lot konstantinos. that was i was looking for :-)
    Greeklish [ayta einai re file. oi ellines katalavainomaste ]

  11. #11
    Join Date
    Oct 2006
    Posts
    50
    . i forgot to mention after typing any of those commands u will be asked for db password. simply enter it in order to backup/load according to what u want to do. in case your databases are big it might take some minutes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •