HOW TO UPDATE A WORKING INSTALLATION

### 1. You should always backup your data:
  * Your installation folder, e.g. /usr/local/netshot
  * Your drivers (if your have customized any), e.g. /usr/local/netshot/drivers
  * Your database
  * Your configuration file, e.g. /etc/netshot.conf

### 2. Stop Netshot

$ sudo service netshot stop

### 3. Copy the updated package

$ sudo cp netshot.jar /usr/local/netshot/netshot.jar

Overwrite the old version.

### 4. 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.

### 5. Start Netshot

$ sudo service netshot start



### Special update steps

### 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.

1. 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;

2. Log into the Netshot UI, go to the Admin tab, and edit each account to enter the secret.

