Upgrading the TeamDrive Host Server

General Upgrade Notes

There are two basic approaches to updating a TeamDrive Host Server: in-place, by replacing the software with a newer version on the live system, or starting a new instance and migrating the configuration and data (MySQL Database and Space Volumes) to the new instance.

For older installations, performing a migration to a freshly installed instance might be the better approach, to get rid of accumulated “cruft” and to start from a clean slate. In case the current system is still running a 32-bit installation, moving to a 64-bit system is required, as newer versions of the Host Server no longer support 32-bit environments.

Updating requires a service interruption, as the Host Server components (e.g. the Apache HTTP Server) need to be stopped while the update is in progress. Short downtimes usually pass unnoticed by the TeamDrive Clients, they will simply try again after a short waiting period. Local Client operations can continue.

The Host Server-specific MySQL Databases and Space Volumes are the two crucial pieces of data that need to be preserved during updates. Take backups prior to performing an update and verify they worked correctly. In case of an in-place upgrade, both the databases and Space Volumes can be taken over “as is”. When performing a migration to a new instance, the databases and volumes need to be copied or moved to the new host.

Updates between different Host Server versions (e.g. from 3.0.011 to 3.0.013) usually require changes to the MySQL table structures. Starting with version 3.0.013, these changes are applied automatically when starting the service after updating. Reversing these changes (e.g. reverting to the previous version) requires going back to the previous backup, there is no automatic roll-back of changes to the database/table structures.

Starting with version 3.0.013, updates to a new build (e.g. from 3.0.013.0 to 3.0.013.1) can be performed using yum/RPM. Updating from older versions requires manual intervention, as the installations were performed without automatic package management.

In-place Upgrading Version 3.5 to a Newer Build

The use of RPM packages makes updating from one build to another (e.g. from 3.5.0 to 3.5.1) a fairly straightforward and automatic process.

Usually, you can simply replace the existing packages while the service is running. The update performs an immediate restart of the services (httpd and td-hostserver automatically):

[root@hostserver ~]# yum update td-hostserver

Check the chapter releasenotes-3.5.0 for the changes introduced in each build.

In-place Upgrading from 3.0.013 to 3.5

These instructions assume a default installation of the TeamDrive Host Server (version 3.0.013) on RHEL6 or a derivative distribution like CentOS 6 (64-bit) that was set up based on the Host Server installation instructions or using the TeamDrive Host Server Virtual Appliance for VMware.

The overall procedure is similar in all cases — we’ll remove the old software components while maintaining the MySQL databases and Space Volumes, install the current versions of the Host Server packages and and migrate a few configuration settings by performing the following steps:

  • Stop the Apache HTTP Server and TeamDrive Host Server processes
  • Perform a backup of the Host Server’s MySQL Databases
  • Update the Host Server RPM package yvva and td-hostserver
  • Update the configuration files
  • Start the TeamDrive Hosting Service and Apache HTTP Server, check the log files for any errors
  • Test the new setup with a local test client before allowing all user Clients to connect to the new instance again

The following paragraphs explain these steps in more detail.

Stop the TeamDrive Services

As a first step, the currently running TeamDrive Hosting Services need to be shut down.

Start by stopping the Apache HTTP Server:

[root@hostserver ~]# service httpd stop

Next, stop the TeamDrive Hosting Service:

[root@hostserver ~]# service td-hostserver stop

and in case of using a S3 compatible object store, stop the s3d service:

[root@hostserver ~]# service s3d stop

Create a MySQL Backup

After all TeamDrive Services have been stopped, you should now create a backup of the MySQL databases, e.g. using mysqldump:

[root@hostserver ~]# mysqldump -u root -p --force \
--databases hostapilog pspace \
| gzip > td-hostserver-mysql-$(date +%Y-%m-%d_%H.%M).sql.gz

Install the new Host Server Software

Install the new Host Server components (td-hostserver and yvva) from the dedicated TeamDrive Host Server yum repository:

[root@hostserver ~]# wget -O /etc/yum.repos.d/td-hostserver.repo \
http://repo.teamdrive.net/td-hostserver.repo
[root\@hostserver ~]# yum update td-hostserver yvva

Yum might show this warning:

warning: /etc/httpd/conf.d/td-hostserver.httpd.conf created as
/etc/httpd/conf.d/td-hostserver.httpd.conf.rpmnew

Please compare both files and take over new or missing values from td-hostserver.httpd.conf.rpmnew to the existing td-hostserver.httpd.conf.

Version 3.5 requieres the following settings in the mysql configuration file /etc/my.cnf. Please add if not already set (the max_connections=512 is the minimum value; it might be necessary to increase the value on your system depending on how many clients are connected to your server):

max_allowed_packet=4M
max_connections=512

Check the ssl.conf and add the following to the end of the default <VirtualHost> section in /etc/httpd/conf.d/ssl.conf if it doesn’t exists:

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

RewriteEngine on
RewriteLogLevel 0
RewriteLog "/var/log/httpd/rewrite.log"
RewriteRule ^/admin$ /admin/ [R]
RewriteRule ^/admin(.*) /yvva/p1a$1 [PT]
RewriteRule ^/pbas/p1_as/api/(.*)$ /yvva/api/$1 [PT]
RewriteRule ^/pbas/p1_as/p1a/(.*)$ /primespace/admin/$1 [PT]
</VirtualHost>

Start the Host Server Components

Now start the TeamDrive Hosting Service:

[root@hostserver ~]# service td-hostserver start
Starting TeamDrive Hosting Services:                       [  OK  ]

Check the log file for any errors:

[root@hostserver ~]# less /var/log/td-hostserver.log

Next, start the Apache HTTP Server:

[root@hostserver ~]# service httpd start
Starting httpd:                                            [  OK  ]

Check the log files for any errors:

[root@hostserver ~]# less /var/log/httpd/error_log
[root@hostserver ~]# less /var/log/mod_yvva.log
[root@hostserver ~]# less /var/log/td-hostserver.log

And in case of using a S3 compatible object store, start the s3d service:

[root@hostserver ~]# service s3d stop
Starting TeamDrive S3 Daemon:                              [  OK  ]

In case of any errors, check the chapter Troubleshooting for guidance.

Log into the Administration Console

After the services have been started, try logging into the Administration Console and verify the settings.

Logging into the Administration Console with the HostAdmin user account. If you don’t recall the password you used, see chapter Changing an Admin User’s Password for details on how to reset it.

Enable the TeamDrive Hosting Service at System Boot

If the update was successful and the service is up and running, make sure it gets started automatically when the system reboots:

[root@hostserver ~]# chkconfig | grep td-hostserver
td-hostserver         0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@hostserver ~]# chkconfig td-hostserver on
[root@hostserver ~]# chkconfig | grep td-hostserver
td-hostserver         0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@hostserver ~]# chkconfig | grep httpd
httpd                 0:off   1:off   2:on    3:on    4:on    5:on    6:off

And in case of using a S3 compatible object store:

[root@hostserver ~]# chkconfig | grep s3d
s3d           0:off   1:off   2:on    3:on    4:on    5:on    6:off

Migrating an Older Host Server Version to a 3.5 Instance

Please refer to the Host Server 3.0.013 documentation how to upgrade to version 3.0.013 before upgrading to version 3.5.