Upgrading

From EPrints Documentation
Jump to: navigation, search
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 somehwat 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_upgrade on all archives. The package manager may only tell you need to run epadmin upgrade but epadmin update is also need 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_upgrade 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/2551/7/eprints-3.4.3.tar.gz)
  2. Download the publications tarball from files.eprints.org, (e.g. https://files.eprints.org/2551/8/eprints-3.4.3-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.3.tar.gz
    tar -xzvf /home/eprints/eprints-3.4.3-flavours.tar.gz
    mv eprints-3.4.3 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: