Forum .LRN Q&A: Re: Guidelines on how to upgrade dotLRN

Collapse
Posted by Hector Amado on
Hi, I finished the upgrade from 2.0.3 to 2.1.0b4  http://unis.galileo.edu 

 Here are some steps i followed:  
 (I am using cvs, postgresql) 

 Before upgrading the live site, create a copy of your site, a dump, to test
 and fix the problems with the upgrade scripts and your database. 

 - Make a tag of your working code or copy to a secure place. 
   I used
           cvs -q tag nameofyourtagdate

 - Make a dump of your database.

           pg_dump database > todaydate.dump    (verify the instruction for user or host)

 - Make a copy of  content-repository-content-files  if your store file in file
system instead of database.

           cp -r content-repository-files    .. . . 



Testing

  - Clean the new database you will create to test

          dropdb databasename 

  - Create the new database

          createdb -E UNICODE  databasename

  - Fill the database with the dump

          psql -f todaydate.dump  databasename


  - Get the working code

          cvs checkout  -r nameofyourtagdate

          or

          cp -r workingcode .... 


   - Remember to change the config.tcl   (ip, port, dbname, ...)

   - Copy the content-repository-files

   - Start the site


   Get the new code

     Get the fresh code, change your specific files, etc ...
     Use cvs for more convinience ..

     cp -r /path/newcode  .  

     or

     cvs -q update -dA  


   - Now browse to  /acs-admin/apm/packages-install

   - Check the new packages to install/upgrade and wait ...

     If there are errors, write the upgrade script and try to fix it or
     post the problem.   And start again  (dropdb, ...  )


   - If no errors, restart the server  (remember to check the config.tcl)


   - Login again and reload many times your browser (the css may be cached)


   - Check the old information ...



   With the new working code upgrade your live site.
   just update and install packages.



 Problems i had: 
dotlrn:
    tcl/apm-callback-procs.tcl

    I changed the apm_upgrade_logic from  2.0.3 2.1.0  to  2.0.3 2.1.0b4

 workflow:
    upgrade-1.2-2.0d1.sql

    I had a problem with this script because it alters a table:

    alter table workflow_fsm_action_en_in_st add constraint
    workflow_fs_action_en_in_st_pk primary key (action_id, state_id);

    The instruction crash because i had duplicate rows, I deleted the
    rows,

    delete from workflow_fsm_action_en_in_st where action_id='4'; ...

    Check the table before running the script.


file-storage:
   upgrade-5.1.0a6-5.1.0a7.sql

    I had a problem with a constraint, but it was a problem with a
    row in my system, i searched the row and change a title.


   static-portlet:
   upgrade-2.0.3d1-2.0.3d2.sql

    This script was not run in the upgrade, check if it is in the
    list of scripts to run, if not run it manually after the upgrade.

   psql -f      packages/static-portlet/sql/postgresql/upgrade/upgrade-2.0.3d1-2.0.3d2.sql ....  



   Greetings,
   Hector