Difference between revisions of "Upgrading"

From EPrints Documentation
Jump to: navigation, search
(epindexer and site-wide configuration integrated, formatting adjusted)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{manual}}
 +
 
== Upgrade from 3.3.x to 3.3.y ==
 
== Upgrade from 3.3.x to 3.3.y ==
  
 +
=== 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.
 
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.
  
Download the appropriate upgrade patch file from the list below and substitue for x and y as appropiate:
+
=== From GitHub ===
 +
If you have installed with GitHub you can update to the latest version using the following commands, substituting ''y'' for the version you want:
 +
 
 +
git fetch origin
 +
git merge tags/v3.3.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.
 +
 
 +
=== 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):
 +
<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
 +
 
 +
<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>
  
Become eprints user and go to eprints installation directory:
+
  mv /opt/eprints3 /opt/eprints3_old
  sudo su eprints
+
  mv /opt/eprints3_new /opt/eprints3
  cd /opt/eprints3
 
  
Check if you are on version 3.3.x:
+
<li> Run epadmin test to check there are no configuration issues, e.g.</li>
cat VERSION
 
  
Apply the patch only if you are on 3.3.x
+
  /opt/eprints3/bin/epadmin test
  patch -p1 < ./upgrade-3.3.x-3.3.y.patch
 
  
You can safely ignore any missing Debian related files during patch by press "Enter". This is due to the patch generated by git.
+
<li> Restart EPrints' indexer.</li>
  
Restart Apache to take effect.
+
/opt/eprints3/bin/epindexer start
  
=== Upgrade Patches ===
+
<li> As the root user, restart Apache.</li>
* [http://files.eprints.org/1027/10/upgrade-3.3.13-3.3.14.patch 3.3.13 to 3.3.14]
 
  
 +
apachectl restart
  
 +
<li>Don't forget to reinstall your Bazaar packages.</li>
 +
</ol>
  
== Upgrading from 3.1 or 3.2 to 3.3 ==
+
== 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 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.1]]
 
* [[Upgrading from 3.2]]
 
* [[Upgrading from 3.2]]

Latest revision as of 13:07, 22 October 2020

Manual Sections

Upgrade from 3.3.x to 3.3.y

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.

From GitHub

If you have installed with GitHub you can update to the latest version using the following commands, substituting y for the version you want:

git fetch origin
git merge tags/v3.3.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.

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):

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