Updating Netshot to a new version - netfishers-onl/Netshot GitHub Wiki
Common instructions
Important note: Downgrades are only supported by restoring a backup of the database.
-
Get the version from the Netshot Release Page, and unzip it on your Netshot server, in a temporary folder:
$ unzip netshot_x.y.z.zip
-
Backup your data Backup the following:
- Your installation folder, e.g.
/usr/local/netshot
- Your drivers (if your have customized any), e.g.
/usr/local/netshot/drivers
- Your database (using
pg_dump
for example) - Your configuration file, e.g.
/etc/netshot.conf
-
Stop Netshot
$ sudo service netshot stop
-
Copy the updated package
sudo cp netshot.jar /usr/local/netshot
-
Check release notes for any required additional actions You might have to upgrade Java version on the system. See the special update notes section in the Update file.
-
Ensure compatibility of your own drivers If you have made local changes to your drivers, or have written your own drivers, you should ensure that they are compatible with the new version, and you might want to adapt them.
-
Start Netshot
$ sudo service netshot start
Specific update steps
Any version to 0.20+
Java environment must be upgraded to GraalVM for Java 21. Check the install guide for version details.
Any version to 0.19+
Java environment must be upgraded to GraalVM for Java 17. Check the install guide for version details.
Any version to 0.16+
Starting with version 0.16, Netshot relies on GraalVM capabilities to execute JavaScript and Python driver, compliance and diagnostic scripts. Thus the standard Oracle or OpenJDK JRE must be replaced by a GraalVM JRE.
Please refer to the standard install instructions to set up GraalVM.
For each version, check the install guide for the proper GraalVM version to use.
0.12.x to 0.13.0
For binary file attributes (used by Checkpoint drivers), add the following configuration to netshot.conf file (/etc/netshot.conf by default):
netshot.snapshots.binary.path = /var/local/netshot
0.7.0 or 0.7.1 to 0.7.2
Remove the unique index from the device table on column connect_ipv4_address
.
mysql -u netshot -p netshot01
> SHOW INDEX FROM device;
Note the Key name for Column_name connect_ipv4_address, then remove the index:
> ALTER TABLE device DROP INDEX `key name noted above`;
Any version to 0.6.0
Starting with 0.6.0 credentials are encrypted in the database. When updating an existing deployment to 0.6.0 or later, the credentials need to be manually reentered so they are properly encrypted.
- Access the database
mysql -u netshot -p netshot01
In case you need a cleartext read of the credential sets, run:
> SELECT * FROM device_credential_set;
Erase the secrets:
> UPDATE device_credential_set SET community = NULL, password = NULL, super_password = NULL;
- Log into the Netshot UI, go to the Admin tab, and edit each account to enter the secret.