Common steps
Here are common steps for any upgrade. Read Release Notes to determine if there are any actions required specific to your version.
- Create backup of the current directory where Changelogic is installed in your server
- In a private temporary directory, unpack the file containing the new version – tar xvzf changelogic-x.x.x.x.tgz
- Copy resources/conf.php from old installation directory to the same location in new directory
- Optional, recommended: back up the database – mysqldump -u username -p schemaname > filename.sql
- if you have forgotten database credentials, you may look them up in resources/conf.php by searching for “DB”
- Delete the old code in CL installation directory, copy new code to the old location
- Make a request to web interface using your web browser to trigger database update
DO NOT restart Apache or MySQL while the first request is being processed (this could take several minutes). Restarting them is not necessary at all, unless Release Notes state otherwise.
Disaster recovery
Here's what to do if the database update should somehow get interrupted and you don't have a fresh backup at hand:
- Using mysql -u username schema_name -p query the last record from table SCHEMA_FEATURE:
select NAME from SCHEMA_FEATURE order by SCHEMA_FEATURE_ID desc limit 1
- Consult resources/events/Update_schema.php to see which feature would be processed next
- Try to evaluate, if something might have been left partial; get the database into a state where starting the feature in Update_schema would be safe.
- Unlock the database from update process:
delete from SCHEMA_FEATURE where NAME='Update::lock'
- Make a request to web interface using your web browser to trigger database update