Upgrading Shares

Note: Aspera recommends that you backup your system before performing an upgrade. For details on how to back up your system, see Backing Up Shares and the Database.
  1. Unpack the installer.
    Run the following command as root, where version is the package version:
    # rpm -Uvh aspera-shares-version.rpm
    The following is an example of the output generated:
      Preparing...                ########################################### [100%]
    
      Switching to the down runlevel ...
      runsvchdir: down: now current.
      Switched runlevel
      
      Checking status of aspera-shares ...
      Status is running
      Stopping aspera-shares ...
      Stopped
      
         1:aspera-shares          ########################################### [100%]
      
      To complete the upgrade, please run this script as the root user:
      
          [root]$ /opt/aspera/shares/u/setup/bin/upgrade
  2. Run the upgrade script.
    # /opt/aspera/shares/u/setup/bin/upgrade 
    The following is an example of the output generated during the upgrade:
      Starting aspera-shares ...
      Started
      Waiting for MySQL server to answer
      mysqld is alive
      Migrating the Shares database ...
      Initializing the Shares database ...
      Clearing background jobs ...
      Migrating the stats collector database ...
      Done
  3. If upgrading from a Shares version prior to 1.5, restore the database.
    Run the following command.
    # /opt/aspera/shares/u/setup/bin/restore directory
    The following is an example of the output generated during the database restoration:
      Checking status of aspera-shares ...
      Status is running
      mysqld is alive
      Restoring the Shares database ...
      Migrating the Shares database ...
      Initializing the Shares database ...
      Configuring the stats collector to poll all nodes ...
      Done 
  4. If the system is configured to serve Aspera Connect locally, point Shares to the new Connect SDK location.
    Note: For more information on serving Connect locally, see Serving Connect from a Local Location.
    To ensure the system continues to serve Connect locally after upgrade, go to the_aspera_web_plugin_install.html.haml file, located in the following location:
    /opt/aspera/shares/u/shares/app/views/node/shared/
    Find the following line:
    - connect_autoinstall_location = '//d3gcli72yxqn2z.cloudfront.net/connect/v4'
    • To programmatically set the domain name of the server, change the line to the following:
      - connect_autoinstall_location = "//#{ request.host_with_port }/connect/v4"
    • To manually set the domain name of the server, change the line to the following, replacing shares.example.com with the Shares server domain.
      - connect_autoinstall_location = '//shares.example.com/connect/v4'
    Find the following line under function loadConnectScript:
    var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.min.js';
    Replace it with the line below, deleting .min:
    var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.js';
  5. Restart all Shares services.
    # service aspera-shares restart
Shares is now running and accessible from the IP address or domain name configured during installation.
Note: If after upgrading, Shares does not load in the browser, check to see if Nginx is running on the Shares machine. If Nginx is not running, and trying to restart the service manually results in the error message below, follow the instructions in Disabling IPv6 Support in Shares to disable Nginx from listening to IPv6 ports.
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
Note: If after upgrading you notice that only the MySQL service is running, see Fixing Services Not Running After Upgrading Shares for instructions on how to fix the issue.