# Upgrade

## Upgrade from 5.0

To upgrade from 5.0 version you must perform a few operations. First of all, you must [upgrade all the binaries](#binaries-upgrade). Next, request for a new 5.1 license file.

First, you must update your `setting.yml` server file. You can do this by creating a new settings file by executing the following command:

```sh
$ flopsar-server config .
```

This will save a default server configuration to a `settings.yml` file in the current directory.&#x20;

{% hint style="danger" %}
Make sure your current `settings.yml` file is not in the current directory, since it will be overwritten by the above command.
{% endhint %}

Next, open this file and move your current settings to this new file. Finally, overwrite your old setting file with this new one. Alternatively, you can compare your current settings file and the new file and add all new options to your current settings file. Either way, you should have a [valid settings](https://docs.flopsar.com/5.1/server#configuration) file.

Second, you must migrate your data to a new version. To do this, execute the command:

```sh
$ flopsar-server migrate <FLOPSAR_DATA>
```

This ends the migration and you should have a working Flopsar 5.1 environment.

## Binaries Upgrade

### Agent

Upgrading the agent is simple, you just override the agent library with the new one.

### Server

If you use an `rpm` package, then you upgrade the server installation by executing the following command:

```shell-session
# rpm -U --noscripts flopsar-server-<VER>.<arch>.rpm
```

If you use deb package, then you upgrade the server installation by executing the following command:

```shell-session
# dpkg -i flopsar-server-<VER>.<arch>.deb
```

### Workstation

If the workstation is served from the server itself, to upgrade it you need to execute the following command:

```shell-session
# flopsar-server update --app flopsar-workstation.zip <server_home>
```

where `<server_home>` is a location of the server home directory.

{% hint style="warning" %}
Make sure, the user the Flopsar server is running on has appropriate permissions to the Workstation files after upgrade.
{% endhint %}
