Difference between revisions of "Upgrading"
m (typos removed, versions updated) |
m (URL/version upgrade) |
||
Line 42: | Line 42: | ||
==== Downloading and Unpacking 3.4 ==== | ==== Downloading and Unpacking 3.4 ==== | ||
<ol> | <ol> | ||
− | <li> Download the main tarball from files.eprints.org, (e.g. https://files.eprints.org/ | + | <li> Download the main tarball from files.eprints.org, (e.g. https://files.eprints.org/3097/5/eprints-3.4.6.tar.gz)</li> |
− | <li> Download the publications tarball from files.eprints.org, (e.g. https://files.eprints.org/ | + | <li> Download the publications tarball from files.eprints.org, (e.g. https://files.eprints.org/3097/6/eprints-3.4.6-flavours.tar.gz)</li> |
<li> As the root user, unpack the tarball under the same parent path as your existing EPrints and change the ownership of this whole directory structure</li> | <li> As the root user, unpack the tarball under the same parent path as your existing EPrints and change the ownership of this whole directory structure</li> | ||
cd /opt | cd /opt | ||
− | tar -xzvf /home/eprints/eprints-3.4. | + | tar -xzvf /home/eprints/eprints-3.4.6.tar.gz |
− | tar -xzvf /home/eprints/eprints-3.4. | + | tar -xzvf /home/eprints/eprints-3.4.6-flavours.tar.gz |
− | mv eprints-3.4. | + | mv eprints-3.4.6 eprints3_new |
chown -R eprints:eprints /opt/eprints3_new | chown -R eprints:eprints /opt/eprints3_new | ||
</ol> | </ol> | ||
+ | |||
==== Installing and Configuring ==== | ==== Installing and Configuring ==== | ||
Latest revision as of 13:19, 1 November 2024
Manual Sections | ||
|
Contents
Upgrade between same series versions of EPrints
If you are upgrading between the same series versions of EPrints (e.g. 3.3.15 to 3.3.16 or 3.4.2 to 3.4.3) then the upgrade process is somewhat more straightforward that upgrading between EPrints series versions (e.g. 3.3.16 to 3.4.3). This page was originally written for upgrading between 3.3 series versions, Upgrading between EPrints 3.4 versions provides additional specific information about EPrints 3.4 series.
From a Linux Package Manager
If you have installed from the Deb or RPM package, then you can just upgrade this. However, it is recommended that you have done a backup before doing this. Also if this is on a production server, that you do this during an extended period of scheduled downtime and have previously tested the upgrade on a pre-production server.
Once the package upgrade has completed make sure to run both epadmin upgrade and epadmin update on all archives. The package manager may only tell you need to run epadmin upgrade but epadmin update is also needed to ensure newly added fields to data objects are also incorporated.
/opt/eprints3/bin/epadmin upgrade ARCHIVEID /opt/eprints3/bin/epadmin update ARCHIVEID
From GitHub
If you have installed with GitHub, the preferred method for production repositories, you can update to the latest version using the following commands, substituting y for the version you want and x for the 3 or 4 depending on whether you are upgrading between EPrints 3.3 or 3.4 series:
git fetch origin git merge tags/v3.x.y
This should warn you if you have made any locally uncommitted changes. You may need to use git stash to move these temporarily and reintegrate after updating from GitHub.
Once updated to the intended tagged release version any resolved and local uncommitted changes then make sure to run both epadmin upgrade and epadmin update on all archives and then reload the webserver and EPrints indexer, e.g.
/opt/eprints3/bin/epadmin upgrade ARCHIVEID /opt/eprints3/bin/epadmin update ARCHIVEID apachectl graceful /opt/eprints3/bin indexer restart
From a Tarball
Although not impossible it is strongly discouraged to upgrade from a tarball. One major reason not to do this is that if you have made any local changes other than to your original archive's configuration, it will be difficult to ensure all these modifications are retained. However, if you wish to do this, you can follow the instructions below, (as the eprints user unless otherwise stated):
Downloading and Unpacking 3.3
- Download the tarball from files.eprints.org, (e.g. https://files.eprints.org/2306/5/eprints-3.3.16.tar.gz)
- As the root user, unpack the tarball under the same parent path as your existing EPrints and change the ownership of this whole directory structure
cd /opt tar -xzvf eprints-3.3.16.tar.gz mv eprints-3.3.16 eprints3_new chown -R eprints:eprints /opt/eprints3_new
Downloading and Unpacking 3.4
- Download the main tarball from files.eprints.org, (e.g. https://files.eprints.org/3097/5/eprints-3.4.6.tar.gz)
- Download the publications tarball from files.eprints.org, (e.g. https://files.eprints.org/3097/6/eprints-3.4.6-flavours.tar.gz)
- As the root user, unpack the tarball under the same parent path as your existing EPrints and change the ownership of this whole directory structure
cd /opt tar -xzvf /home/eprints/eprints-3.4.6.tar.gz tar -xzvf /home/eprints/eprints-3.4.6-flavours.tar.gz mv eprints-3.4.6 eprints3_new chown -R eprints:eprints /opt/eprints3_new
Installing and Configuring
- As the root user, stop Apache and EPrints' indexer.
- Move the archive(s) from your old EPrints to your new one, e.g.
- Copy SystemSettings.pm to your new EPrints as well as site-wide settings
- If you are aware of any local modifications to files under your EPrints path (e.g. /opt/eprints3) but outside the archives directory then compare these files using diff to work out how your local changes can be integrated. E.g.
- As the root user, switch round the old and new versions of EPrints, e.g.
- Run epadmin test to check there are no configuration issues, e.g.
- Run epadmin upgrade and epadmin update to deploy any structural changes or addition of fields to the database, e.g.
- Restart EPrints' indexer.
- As the root user, restart Apache.
- Don't forget to reinstall your Bazaar packages.
apachectl graceful-stop /opt/eprints3/bin/epindexer stop
mv /opt/eprints3/archives/* /opt/eprints3_new/archives/
cp -p /opt/eprints3/perl_lib/EPrints/SystemSettings.pm /opt/eprints3_new/perl_lib/EPrints/ cp -pR /opt/eprints3/cfg /opt/eprints3_new/cfg cp -pR /opt/eprints3/site_lib /opt/eprints3_new/site_lib
diff /opt/eprints3/perl_lib/EPrints/MetaField/Date.pm /opt/eprints3_new/perl_lib/EPrints/MetaField/Date.pm
mv /opt/eprints3 /opt/eprints3_old mv /opt/eprints3_new /opt/eprints3
/opt/eprints3/bin/epadmin test
/opt/eprints3/bin/epadmin upgrade ARCHIVEID /opt/eprints3/bin/epadmin update ARCHIVEID
/opt/eprints3/bin/epindexer start
apachectl restart
Upgrading to EPrints to 3.3
Upgrading from older 3.1 and 3.2 versions of EPrints to 3.3 is somewhat more involved. Please see the following guides:
Upgrading to EPrints 3.4
To upgrade to EPrints 3.4 you will need to already be running a version of EPrints 3.3. Ideally at least 3.3.12, which has the following guide: