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


Previous versions


1.3. How to upgrade an installation of OpenPLM


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 Database

See your database documentation: 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 file). You should also copy your apache configuration and your celery files (/etc/init.d/celetyd and /etc/default/celeryd). Files

Copy /var/openPLM/docs. 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. Search indexes

You can also copy /var/openPLM/xapian_index, it is easy to rebuild the index but it can take a few minutes. 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 Development version (svn)

  1. Backup your files, code,, 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 file) Stable version (tarball)

Here, openPLM is installed in /var/django.

  1. Backup your files, code,, 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 file:

    • cp /var/django/openPLM/ /var/django/openPLM/
    • cp backups/ /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/ /path/to/ (svn should have merged your settings and the original settings)

  • tarball:

    diff -u /var/django/openPLM/ /var/django/openPLM/

1.3.6. Migrating the database

One simple command:

  • ./ migrate

1.3.7. Translations

Not required if you update using the tarball:

  1. make
  2. ./bin/ compile all

1.3.8. Search indexes

Not really required but some functionalities may run faster.

  1. ./ rebuild_index
  2. chown www-data:www-data -R /var/openPLM 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:

  • ./ 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 OpenPLM 1.2

You can load more optional lifecycles:

  • ./ 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 ;-)