1. Backup everything

sudo cp -a /var/www/html/roundcube /var/www/html/roundcube.backup

Also back up your Roundcube database:

mysqldump -u roundcube -p roundcube > roundcube.sql

2. Download Roundcube 1.7.2

cd /tmp

wget https://github.com/roundcube/roundcubemail/releases/download/1.7.2/roundcubemail-1.7.2-complete.tar.gz

tar -xzf roundcubemail-1.7.2-complete.tar.gz

3. Preserve your configuration

cp /var/www/html/roundcube/config/config.inc.php /tmp/

4. Replace the application files

sudo mv /var/www/html/roundcube /var/www/html/roundcube.old

sudo mv /tmp/roundcubemail-1.7.2 /var/www/html/roundcube

5. Restore your configuration

sudo cp /tmp/config.inc.php /var/www/html/roundcube/config/

6. Upgrade the database

Open https://your-domain/roundcube/installer/

When it finishes successfully, remove the installer:

sudo rm -rf /var/www/html/roundcube/installer

7. Fix permissions

sudo chown -R www-data:www-data /var/www/html/roundcube