Table Of Contents

Previous topic

1.2. How to install openPLM server (development version)

Next topic

10. Upgrading from OpenPLM 1.2 to OpenPLM 2.0

This Page

Languages

Previous versions

1.2
1.1

1.3. How to upgrade an installation of OpenPLM

Warning

Before upgrading your installation, read the whole document and be sure to have reliable backups.

You should also read the following instructions:

1.3.2. Stopping the server

  • service apache2 stop
  • service celeryd stop

1.3.3. Backups

1.3.3.1. Database

See your database documentation:

1.3.3.2. Code

Backups are mostly useless if you do not have the code that was running.

Copy the content of /path/to/openPLM/ (directory containing the settings.py file). You should also copy your apache configuration and your celery files (/etc/init.d/celetyd and /etc/default/celeryd).

1.3.3.3. Files

Copy /var/openPLM/docs.

1.3.3.4. Thumbnails and 3D files

Copy /path/to/openPLM/media/thumbnails and /path/to/openPLM/media/public.

If document3D application is installed, copy /path/to/openPLM/media/3D.

1.3.3.5. Search indexes

You can also copy /var/openPLM/xapian_index, it is easy to rebuild the index but it can take a few minutes.

1.3.3.6. Restoring a backup

  • Stop apache and celery
  • Restore all files
  • Restore the database
  • Restore the code
  • Restore search indexes or rebuild them

1.3.4. Updating the code

You should remove old .pyc files:

  • find path/to/openPLM -name '*.pyc' -delete

1.3.4.1. Development version (svn)

  1. Backup your files, code, settings.py, thumbnails...
  2. Check your own modification: svn up and svn diff
  3. Run svn up
  4. Restore your own settings (svn should have gracefully updated the settings.py file)

1.3.4.2. Stable version (tarball)

Here, openPLM is installed in /var/django.

  1. Backup your files, code, settings.py, thumbnails...

  2. Extract the tarball in a temporary directory. For example: tar xzf openplm-XYZ.tgz -C . /tmp

  3. Copy the files: cp -rp /tmp/openplm/openPLM /var/django, /var/django is the directory containing your openPLM directory

  4. Restore your settings.py file:

    • cp /var/django/openPLM/settings.py /var/django/openPLM/settings.py.orig
    • cp backups/settings.py /var/django/openPLM
  5. Fix the python path in apache *.wsgi files: sed -in 's#\(/var/django/\)openPLM/trunk/#\1#' apache/*.wsgi

1.3.5. New settings

It is possible that a new version comes with new settings. Generally, new settings are optional and their default values do not changes the behavior of a previous installation. New settings may better fit your needs. You can easily determinate new settings:

  • development version:

    diff /path/to/backup/settings.py /path/to/settings.py (svn should have merged your settings and the original settings)

  • tarball:

    diff -u /var/django/openPLM/settings.py /var/django/openPLM/settings.py.orig

1.3.6. Migrating the database

One simple command:

  • ./manage.py migrate

1.3.7. Translations

Not required if you update using the tarball:

  1. make
  2. ./bin/translate_all.sh compile all

1.3.8. Search indexes

Not really required but some functionalities may run faster.

  1. ./manage.py rebuild_index
  2. chown www-data:www-data -R /var/openPLM

1.3.8.1. Determining if you should rebuild the index

Rebuilding search indexes can take several minutes depending on the number of indexed parts, documents and files. You can try to rebuild indexes and if it takes too much time you can safely restore your backed up indexes.

Version 1.2:

  • group attribute is indexed and it is now possible to query documents by their group (group=a_group_name). Previously, a query like a_group_name matched the right documents but group=a_group_name would returned an empty result set.
  • OpenPLM 1.2 tests if a search result is readable by the current user. If search indexes are not rebuilt, each search will hit the database and take a little more time.

1.3.9. Collecting static files

New in version 2.0.

Not required if you update using the tarball:

  • ./manage.py collectstatic

1.3.10. File permissions

  • chown www-data:www-data -R /var/openPLM
  • chown www-data:www-data -R /var/django/openPLM/trunk/openPLM/media/thumbnails
  • chown www-data:www-data -R /var/django/openPLM/trunk/openPLM/media/public/thumbnails
  • chown www-data:www-data -R /var/django/openPLM/trunk/openPLM/media/3D if document3D is installed

1.3.11. Enabling new applications

A new version of OpenPLM often comes with new optional applications. You can enable them according to your needs.

1.3.12. Other actions

1.3.12.1. OpenPLM 1.2

You can load more optional lifecycles:

  • ./manage.py loaddata extra_lifecycles

1.3.13. Starting the server

service celeryd start

service apache2 start

Now you can test and complain if something does not work ;-)