Difference between revisions of "Upgrading"

From EPrints Documentation
Jump to: navigation, search
m
m (URL/version upgrade)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Upgrade from 3.3.x to 3.3.y ==
+
{{manual}}
 +
 
 +
== 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 ===
 
=== 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.
 +
 +
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 ===
 
=== From GitHub ===
If you have installed with GitHub you can update to the latest version using the following commands, substituting y form the version you want:
+
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 fetch origin
  git merge tags/v3.3.y
+
  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.
  
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 ===
 
=== 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):
 
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. http://files.eprints.org/1073/2/eprints-3.3.15.tar.gz)
+
==== 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
  
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:
+
</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>
  
  tar -xzvf eprints-3.3.15.tar.gz /opt/eprints3_new
+
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
 
  chown -R eprints:eprints /opt/eprints3_new
  
3. Move the archive(s) from your old EPrints to your new one, e.g.:
+
</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/
 
  mv /opt/eprints3/archives/* /opt/eprints3_new/archives/
  
4. Copy SystemSettings.pm to you new EPrints
+
<li> Copy SystemSettings.pm to your new EPrints as well as site-wide settings</li>
  
  cp /opt/eprints3/perl_lib/EPrints/SystemSettings.pm /opt/eprints3_new/perl_lib/EPrints/
+
  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
  
5. If you are aware of any local modifications to files under your EPrints path (e.g. /opt/eprints3) but outside in the archives directory then compare these files using diff to work out how your local changes can be integrated.  E.g.
+
<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  
 
  diff /opt/eprints3/perl_lib/EPrints/MetaField/Date.pm /opt/eprints3_new/perl_lib/EPrints/MetaField/Date.pm  
  
6. As the root user, switch round the old and new versions of EPrints, e.g.
+
<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 /opt/eprints3_old
 
  mv /opt/eprints3_new /opt/eprints3
 
  mv /opt/eprints3_new /opt/eprints3
  
7. Run epadmin test to check there are no configuration issues, e.g.:
+
<li> Run epadmin test to check there are no configuration issues, e.g.</li>
  
 
  /opt/eprints3/bin/epadmin test
 
  /opt/eprints3/bin/epadmin test
  
8. As the root user, restart Apache.
+
<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
 
  apachectl restart
  
 +
<li>Don't forget to reinstall your Bazaar packages.</li>
 +
</ol>
  
 
== Upgrading to EPrints to 3.3 ==
 
== Upgrading to EPrints to 3.3 ==
Line 52: Line 106:
 
* [[Upgrading from 3.1]]
 
* [[Upgrading from 3.1]]
 
* [[Upgrading from 3.2]]
 
* [[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: