Difference between revisions of "Upgrading"

From EPrints Documentation
Jump to: navigation, search
m (Upgrade from 3.3.13 to 3.3.14)
m (URL/version upgrade)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Upgrade from 3.3.13 to 3.3.14==
+
{{manual}}
  
You can upgrade to 3.3.14 from 3.3.13 without re-install EPrints.  
+
== 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.
  
Download the upgrade patch file: http://files.eprints.org/1027/10/upgrade-3.3.13-3.3.14.patch
+
=== 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.
  
Become eprints user and go to eprints installation directory:
+
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.
  sudo su eprints
+
  /opt/eprints3/bin/epadmin upgrade ARCHIVEID
  cd /opt/eprints3
+
  /opt/eprints3/bin/epadmin update ARCHIVEID
  
Check if you are on version 3.3.13:
+
=== From GitHub ===
cat VERSION
+
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:
  
Apply the patch only if you are on 3.3.13
+
git fetch origin
  patch -p1 < ./upgrade-3.3.13-3.3.14.patch
+
  git merge tags/v3.x.y
  
You can safely ignore the missing debian related files during patch by press "Enter". This is due to the git generates the patch.
+
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
  
Restart apache to take effect.
+
=== 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 ====
 +
<ol>
 +
<li> Download the tarball from files.eprints.org, (e.g. https://files.eprints.org/2306/5/eprints-3.3.16.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>
 +
 
 +
cd /opt
 +
tar -xzvf eprints-3.3.16.tar.gz
 +
mv eprints-3.3.16 eprints3_new
 +
chown -R eprints:eprints /opt/eprints3_new
 +
 
 +
</ol>
 +
==== Downloading and Unpacking 3.4 ====
 +
<ol>
 +
<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/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>
 +
 
 +
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
 +
 
 +
</ol>
 +
 
 +
==== Installing and Configuring ====
 +
 
 +
 
 +
<ol>
 +
<li> As the root user, stop Apache and EPrints' indexer.</li>
 +
 
 +
apachectl graceful-stop
 +
/opt/eprints3/bin/epindexer stop
 +
 
 +
<li> Move the archive(s) from your old EPrints to your new one, e.g.</li>
 +
 
 +
mv /opt/eprints3/archives/* /opt/eprints3_new/archives/
 +
 
 +
<li> Copy SystemSettings.pm to your new EPrints as well as site-wide settings</li>
 +
 
 +
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
 +
 
 +
<li> 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.</li>
 +
 
 +
diff /opt/eprints3/perl_lib/EPrints/MetaField/Date.pm /opt/eprints3_new/perl_lib/EPrints/MetaField/Date.pm
 +
 
 +
<li> As the root user, switch round the old and new versions of EPrints, e.g.</li>
 +
 
 +
mv /opt/eprints3 /opt/eprints3_old
 +
mv /opt/eprints3_new /opt/eprints3
 +
 
 +
<li> Run epadmin test to check there are no configuration issues, e.g.</li>
 +
 
 +
/opt/eprints3/bin/epadmin test
 +
 
 +
<li> Run ''epadmin upgrade'' and ''epadmin update'' to deploy any structural changes or addition of fields to the database, e.g.</li>
 +
 
 +
/opt/eprints3/bin/epadmin upgrade ARCHIVEID
 +
/opt/eprints3/bin/epadmin update ARCHIVEID
 +
 
 +
<li> Restart EPrints' indexer.</li>
 +
 
 +
/opt/eprints3/bin/epindexer start
 +
 
 +
<li> As the root user, restart Apache.</li>
 +
 
 +
apachectl restart
 +
 
 +
<li>Don't forget to reinstall your Bazaar packages.</li>
 +
</ol>
 +
 
 +
== 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 from 3.1]]
 +
* [[Upgrading from 3.2]]
 +
 
 +
== 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:
 +
* [[Upgrading 3.3.12+ to 3.4]]

Latest revision as of 13:19, 1 November 2024

Manual Sections

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

  1. Download the tarball from files.eprints.org, (e.g. https://files.eprints.org/2306/5/eprints-3.3.16.tar.gz)
  2. 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
  3. 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

  1. Download the main tarball from files.eprints.org, (e.g. https://files.eprints.org/3097/5/eprints-3.4.6.tar.gz)
  2. Download the publications tarball from files.eprints.org, (e.g. https://files.eprints.org/3097/6/eprints-3.4.6-flavours.tar.gz)
  3. 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
  4. 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

  1. As the root user, stop Apache and EPrints' indexer.
  2. apachectl graceful-stop
    /opt/eprints3/bin/epindexer stop
    
  3. Move the archive(s) from your old EPrints to your new one, e.g.
  4. mv /opt/eprints3/archives/* /opt/eprints3_new/archives/
    
  5. Copy SystemSettings.pm to your new EPrints as well as site-wide settings
  6. 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
    
  7. 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.
  8. diff /opt/eprints3/perl_lib/EPrints/MetaField/Date.pm /opt/eprints3_new/perl_lib/EPrints/MetaField/Date.pm 
    
  9. As the root user, switch round the old and new versions of EPrints, e.g.
  10. mv /opt/eprints3 /opt/eprints3_old
    mv /opt/eprints3_new /opt/eprints3
    
  11. Run epadmin test to check there are no configuration issues, e.g.
  12. /opt/eprints3/bin/epadmin test
    
  13. Run epadmin upgrade and epadmin update to deploy any structural changes or addition of fields to the database, e.g.
  14. /opt/eprints3/bin/epadmin upgrade ARCHIVEID
    /opt/eprints3/bin/epadmin update ARCHIVEID
    
  15. Restart EPrints' indexer.
  16. /opt/eprints3/bin/epindexer start
    
  17. As the root user, restart Apache.
  18. apachectl restart
    
  19. Don't forget to reinstall your Bazaar packages.

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: