Warning
Before upgrading your installation, read the whole document and be sure to have reliable backups.
- service apache2 stop
- service celeryd stop
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).
Copy /var/openPLM/docs.
Copy /path/to/openPLM/media/thumbnails and /path/to/openPLM/media/public.
If document3D application is installed, copy /path/to/openPLM/media/3D.
You can also copy /var/openPLM/xapian_index, it is easy to rebuild the index but it can take a few minutes.
- Stop apache and celery
- Restore all files
- Restore the database
- Restore the code
- Restore search indexes or rebuild them
- Backup your files, code, settings.py, thumbnails...
- Check your own modification: svn up and svn diff
- Run svn up
- Restore your own settings (svn should have gracefully updated the settings.py file)
Here, openPLM is installed in /var/django.
Backup your files, code, settings.py, thumbnails...
Extract the tarball in a temporary directory. For example: tar xzf openplm-XYZ.tgz -C . /tmp
Copy the files: cp -rp /tmp/openplm/openPLM /var/django, /var/django is the directory containing your openPLM directory
Restore your settings.py file:
- cp /var/django/openPLM/settings.py /var/django/openPLM/settings.py.orig
- cp backups/settings.py /var/django/openPLM
Fix the python path in apache *.wsgi files: sed -in 's#\(/var/django/\)openPLM/trunk/#\1#' apache/*.wsgi
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
Not required if you update using the tarball:
- make
- ./bin/translate_all.sh compile all
Not really required but some functionalities may run faster.
- ./manage.py rebuild_index
- chown www-data:www-data -R /var/openPLM
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.
- 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
A new version of OpenPLM often comes with new optional applications. You can enable them according to your needs.
service celeryd start
service apache2 start
Now you can test and complain if something does not work ;-)