Upgrade Mahara
It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.
Upgrade Mahara and all Stack components (recommended)
-
Log in to the server console.
-
Create a directory to save all the data you need to backup.
$ mkdir ~/mahara-backup
-
Back up the bitnami_mahara database as described on the MySQL page.
-
Copy the data and maharadata directories and the config.php configuration file to your backup directory:
$ sudo cp -rf /opt/bitnami/apps/mahara/maharadata ~/mahara-backup $ sudo cp -rf /opt/bitnami/apps/mahara/conf ~/mahara-backup $ sudo cp /opt/bitnami/apps/mahara/htdocs//config.php ~/mahara-backup
-
If you use non-core plugins or themes in your site, make sure to copy them to the backup directory.
-
Compress the backup directory.
$ tar cfz mahara-backup.tar.gz ~/mahara-backup
-
Download the backup files mahara-backup.tar.gz and backup.sql using SFTP. Refer to the FAQ for more information on this.
-
Launch a new Mahara server.
-
Upload via SFTP the backups files mahara-backup.tar.gz and backup.sql to the new server. Refer to the FAQ for more information on this.
-
Log in to the server console.
-
Browse to http://SERVER-IP/admin/ (SERVER-IP is a placeholder, please, replace it with the actual domain of your Mahara server). In the section “Close site”, click the “Close” button in order to set the “Maintenance mode”.
-
Restore the database backup as described on the MySQL page.
-
Uncompress and restore the backup files in the new Mahara stack.
$ tar xfz mahara-backup.tar.gz $ sudo cp -rf ~/mahara-backup/maharadata /opt/bitnami/apps/mahara/maharadata $ sudo cp -rf ~/mahara-backup/conf /opt/bitnami/apps/mahara/conf $ sudo cp ~/mahara-backup/config.php /opt/bitnami/apps/mahara/htdocs/
-
Restore the permissions.
$ sudo chown -R bitnami:daemon /opt/bitnami/apps/mahara/htdocs/ $ sudo chown -R daemon:daemon /opt/bitnami/apps/mahara/maharadata
-
Open the file /opt/bitnami/apps/mahara/htdocs-backup/config.php and obtain the value of the property $cfg->urlsecret.
NOTE: In the example below, replace the URLSECRET placeholder with the value you obtained in the previous step.
- Browse to http://SERVER-IP/admin/upgrade.php?urlsecret=URLSECRET. (SERVER-IP is a placeholder, please, replace it with the actual domain of your Mahara server).
- Click the “Upgrade” button.
- Browse to http://SERVER-IP/admin/. (SERVER-IP is a placeholder, please, replace it with the actual domain of your Mahara server).
- In the section “Close site”, click the “Open” button in order to unset the “Maintenance mode”.
- That’s all! You updated your whole server!
Upgrade only Mahara in the Bitnami Mahara Stack
-
Browse to http://SERVER-IP/admin/. (SERVER-IP is a placeholder, please, replace it with the actual domain of your Mahara server).
-
In the section “Close site”, click the “Close” button in order to set the “Maintenance mode”.
-
Browse to https://launchpad.net/mahara/+download and find the link for the latest version of Mahara.
-
Log in your server console and download the latest version using the link you obtained in the previous step. For example (for version 17.04.0), run the commands below:
$ wget https://launchpad.net/mahara/17.04/17.04.0/+download/mahara-17.04.0.tar.gz $ tar xfz mahara-17.04.0.tar.gz
-
Backup your current Mahara Installation.
$ sudo mv /opt/bitnami/apps/mahara/htdocs/ /opt/bitnami/apps/mahara/htdocs-backup/
-
Substitute your old installation with the new version and recover the configuration file.
$ sudo mv ~/mahara-17.04.0/htdocs/ /opt/bitnami/apps/mahara/htdocs/ $ sudo cp /opt/bitnami/apps/mahara/htdocs-backup/config.php /opt/bitnami/apps/mahara/htdocs/
-
Restore the permissions.
$ sudo chown -R bitnami:daemon /opt/bitnami/apps/mahara/htdocs/
-
Open the file /opt/bitnami/apps/mahara/htdocs-backup/config.php and note down the value of the property $cfg->urlsecret.
NOTE: In the example below, replace the URLSECRET placeholder with the value you obtained in the previous step.
- Browse to http://SERVER-IP/admin/upgrade.php?urlsecret=URLSECRET. (SERVER-IP is a placeholder, please, replace it with the actual domain of your Mahara server).
- Click the “Upgrade” button.
- Browse to http://SERVER-IP/admin/. (SERVER-IP is a placeholder, please, replace it with the actual domain of your Mahara server).
- In the section “Close site”, click the “Open” button in order to unset the “Maintenance mode”.
- That’s all! You updated your application!