forked from ome/omero-documentation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver-upgrade.txt
220 lines (155 loc) · 7.29 KB
/
server-upgrade.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
OMERO.server upgrade
====================
The OME team is committed to providing frequent, project-wide upgrades
both with bug fixes and new functionality. We try to make the schedule
for these releases as public as possible. You may want to take a look
at the roadmap_ for exactly what will go into a release. We always inform our
:community_plone:`mailing lists <>` of the development
status. Finally, all the products check themselves with the
OmeroRegistry for update notifications on startup. If you wish
to disable this functionality you should do so now as outlined on the
:doc:`/sysadmins/UpgradeCheck` page.
.. note::
Before starting the upgrade, please ensure that you have
obtained all the prerequisites for installation, documented for
Unix and Windows. In particular, ensure that you are running a
suitable version of PostgreSQL to enable successful upgrading of
the database.
If you encounter errors during a OMERO upgrade, database upgrade, etc.
you should retain as much log information as possible and notify the
OMERO.server team via the mailing lists available on the
:community_plone:`community <>` page.
The main goals of the OMERO 4.4.4 release is to improve the OMERO
documentation and fix various bugs. See the full details of OMERO 4.4.4
features in the :forum:`Announcements <viewforum.php?f=11>` forum.
For all users, the basic worflow for upgrading your OMERO.server is listed
below. Please refer to each section for additional details.
.. contents::
:local:
:depth: 1
.. note::
The passwords and logins used here are examples. Please consult the
:ref:`troubleshooting-password` section for explanation.
Perform a database backup
-------------------------
The first thing to do before **any** upgrade activity is to backup your
database.
::
$ pg_dump -h localhost -U db_user -Fc -f before_upgrade.db.dump omero_database
Copy new binaries
-----------------
Before copying the new binaries, stop the existing server::
$ cd OMERO.server
$ bin/omero web stop
$ bin/omero admin stop
Your OMERO configuration is stored using ``config.xml`` in the``etc/grid``
directory under your OMERO.server directory. Assuming you have not made any
file changes within your OMERO.server distribution directory, you are safe to
follow the following upgrade procedure:
.. parsed-literal::
$ cd ..
$ mv OMERO.server OMERO.server-old
$ unzip |OMEROserverzip|
$ cp OMERO.server-old/etc/grid/config.xml |OMEROserverzip|/etc/grid
.. note::
``ice3x`` and ``byy`` **need to be replaced** by the appropriate Ice
version and build number of OMERO.server.
Upgrade your database
---------------------
.. only:: point_release
.. warning::
This section only concerns users upgrading from a |previousversion| or
earlier server. If upgrading from a |version| server, you do not need
to upgrade the database.
Run the upgrade script
^^^^^^^^^^^^^^^^^^^^^^
You **must** use the same username and password you have defined during
:doc:`unix/server-installation`. The |version| upgrade script should execute in a short time.
.. parsed-literal::
$ cd |OMEROserverzip|
$ psql -h localhost -U db_user omero_database < sql/psql/OMERO\ |version|\_\_0/OMERO |previousversion|\_\_0.sql
Password for user db_user:
...
...
status
---------------------------------------------------------------------
+
+
+
YOU HAVE SUCCESSFULLY UPGRADED YOUR DATABASE TO VERSION OMERO |version|\_\_0+
+
+
(1 row)
Optimise an upgraded database (optional)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
After you have run the upgrade script, you may want to optimise your
database which can both save disk space and speed up access times.
::
$ psql -h localhost -U db_user omero_database -c "REINDEX DATABASE omero_database FORCE;"
$ psql -h localhost -U db_user omero_database -c "VACUUM FULL VERBOSE ANALYZE;"
.. _upgrademergescript:
Merge script changes
--------------------
If any new official scripts have been added under ``lib/scripts`` or if
you've modified any of the existing ones, then you will need to backup
your modifications. Doing this, however, is not as simple as copying the
directory over since the core developers will have also improved these
scripts. In order to facilitate saving your work, we've turned the
scripts into a Git submodule which can be found at
`<https://github.com/ome/scripts>`_. For more information on how to use Git
submodules, please consult the
:faq_plone:`FAQ <omero/how-do-i-make-lib-scripts-a-git-repository>`.
If you would like help merging the two repositories, please contact the
OME developers.
Update your environment variables
---------------------------------
Environment variables
^^^^^^^^^^^^^^^^^^^^^
If you changed the directory name where the |release| server code resides,
make sure to update any system environment variables. Before restarting
the server, make sure your PATH and PYTHONPATH system environment
variables are pointing to the new locations.
Changes to OMERO.web URLs
^^^^^^^^^^^^^^^^^^^^^^^^^
In order to ease deployment and avoid errors for IIS (Windows production
deployment) and Apache (notably CentOS/RHEL 5 and 6) OMERO.web now
defaults to being "mounted on ``/omero``". The new OMERO.web web server
stanzas have redirects in them with the notable exception of IIS.
Depending on your web server configuration you may need to visit your
OMERO.web instance at
``http://example.com/omero/``
As a result of this your web server configuration stanza generated by
the previous version of ``bin/omero web config`` has to be replaced with
the new version. To generate the relevant configuration, please run
``bin/omero web config <webserver>``, update and restart your web
server.
Restart your database
---------------------
- Following a successful database upgrade, you can start the server.
.. parsed-literal::
$ cd |OMEROserverzip|
$ bin/omero admin start
- If anything goes wrong, please send the output of
``bin/omero admin diagnostics`` to
- Start OMERO.web with the following command:
::
$ bin/omero web start
Restore a database backup
-------------------------
If the upgraded database or the new server version do not work for you,
or you otherwise need to rollback to a previous database backup, you may
want to restore a database backup. To do so, create a new database,
::
$ createdb -h localhost -U postgres -O db_user omero_from_backup
restore the previous archive into this new database,
::
$ pg_restore -Fc -d omero_from_backup before_upgrade.db.dump
and configure your server to use it.
::
$ bin/omero config set omero.db.name omero_from_backup
.. |OMEROserverzip| replace:: OMERO.server-|release|-ice3x-byy.zip
.. seealso::
:legacy_plone:`Legacy <>`
Legacy part of the OME website containing upgrade instructions for
previous versions of the OMERO server.