Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This

...

This How-To shows you, how to update a translate5 installation which is set up as shown in the translate5 Ubuntu installation How-To.

Users of other Linux distributions should be able to adopt the described steps.

Info
titleFor PHP 5.6 Updaters

Current version of translate5 runs only with PHP 7.3. If you update from PHP 5.6 to 7.3 it can happen that install and update script complains about the wrong PHP version.

If this is the case, just unzip the translate5.zip in you application folder and confirm that all files should be overwritten. This affects only the application files, no user data.

After that the install and update script should be runable again.


Update the file tree and database structure

Backup translate5

Warning
Although our updates are well tested, we strongly recommend to make a backup of the whole application directory /var/www/translate5 and the translate5 database!
Creating a backup is currently not part of this manual or the update script itself!

Check for public updates

If you login into translate5 as a user with admin system role, you may receive such notification:

Image Added

If you use the public version of translate5 this means, that a new version is available. If you use a customized version (delivered by email link) ignore that message.

Update translate5

Open the command line.

Change to translate5 directory:


Code Block
languagebash
cd /var/www/translate5

...

Change to the Linux apache user, to automatically give the files the correct rights

su apache

Update translate5 and its submodules and dependencies via git

git pull
git submodule foreach git pull
cd application/modules/editor
git submodule foreach git pull
cd /var/www/translate5/library/ZfExtended
git submodule foreach git pull

Update the database structure

Log into your mysql via command line

mysql -u root -p translate5

In the mysql prompt insert the following query, which allows you, to call the database updater.
Caution: You have to deactivate this afterwards to disable public access.

INSERT INTO Zf_acl_rules (`module`, `role`, `resource`, `right`) values('default', 'noRights', 'database', 'all') ON DUPLICATE KEY UPDATE `module` = 'default', `role` = 'noRights', `resource` = 'database', `right` = 'all';

Open your browser and call

http://translate5.l/database/forceimportall

If you are a translate5 expert, you cann call as an alternative to the previous browser call

http://translate5.l/database/import

This will show you a list of database update scripts, which need to be imported. You can choose, which script you want to execute or skip.

In any case: Important: Please go back to your mysql prompt and execute the following query:


sudo chown -R www-data:www-data .
sudo -u www-data ./install-and-update.sh --maintenance 16:00 "Reason for maintenance: Translate5 Update"  # adjust the time and notice text to your needs 

# if you use the public version of translate5:
sudo -u www-data ./install-and-update.sh
# if you use a customized installation package: 
sudo -u www-data ./install-and-update.sh /path/to/the/custom/translate5-1.2.3.zip

# if in use, restart the frontend messagebus now! See below.

sudo -u www-data ./install-and-update.sh --maintenance off

The script is looking for file updates on translate5 update server. If there is a new version available, the package is downloaded and installed automatically.

Database is also updated automatically. Find out more about the updater script.

Restart of frontend message bus

Before leaving the maintenance mode the frontend message bus should be restarted. How to do that depends on how it is started on your machine.

If you followed the translate5 Installation Guide a

Code Block
sudo supervisorctl restart all

should do the job.

Optional: Restart openTMSTermTagger REST-server

Please watch the output of the updater. If openTMSTermTagger has been updated, restart your openTMSTermTagger instance. DELETE FROM Zf_acl_rules WHERE module = 'default' AND resource = 'database';

That's it. You are done. translate5 is up2date (smile)