Tip
This is the documentation for the 19.02 version. Looking for the documentation of the latest version? Have a look here.
Updating TNSR¶
Warning
Trial versions of TNSR cannot be updated. Reinstall with a full version of TNSR or install a new trial version.
With a signed client certificate from Netgate in place, TNSR has access to the
Netgate software repositories which contain important updates. These updates can
be retrieved using the package
command in the TNSR CLI, or yum
in the
host OS shell.
Pre-Upgrade Tasks¶
Before updating TNSR, perform the following tasks:
Make sure the signed certificate is in place (Install the certificate)
Make sure the TNSR instance has working Internet connectivity through the host OS management interface
Take a backup of the running and startup configurations (Configuration Backups)
Updating via the TNSR CLI¶
The easiest way to update TNSR is from within the TNSR CLI itself.
tnsr# package upgrade
That command will download and apply all available updates. Afterward, exit the CLI and start it again.
Updating via the shell¶
TNSR can also be updated from the command line using the host OS package
management commands, in this case, yum
:
$ sudo yum clean all
$ sudo yum clean expire-cache
$ sudo yum -y upgrade
Update Script¶
The following shell script may be used to keep TNSR and CentOS updated. In addition to the updates it also makes a local backup before performing the update.
1#!/bin/sh
2
3# Stop existing services
4sudo systemctl stop strongswan-swanctl frr vpp clixon-restconf
5
6# Time to make the backups
7mkdir -p ~/tnsr-config-backup
8sudo cp -p /var/tnsr/running_db ~/tnsr-config-backup/running_db-`date +%Y%m%d%H%M%S`.xml
9sudo cp -p /var/tnsr/startup_db ~/tnsr-config-backup/startup_db-`date +%Y%m%d%H%M%S`.xml
10
11# Update all RPMs
12sudo yum clean all
13sudo yum clean expire-cache
14sudo yum -y upgrade
15
16# Ensure services are stopped, in case some automatically started after update.
17sudo systemctl stop strongswan-swanctl frr vpp clixon-restconf
18# Start services
19sudo systemctl start clixon-backend clixon-restconf
Update Troubleshooting¶
If the TNSR CLI method does not work, use the shell method instead.
If either method prints an error referring to a broken package database, recover it as follows:
$ mkdir -p ~/tmp/
$ sudo mv /var/lib/rpm/__db* ~/tmp/
$ sudo rpm --rebuilddb
$ sudo yum clean all