> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt
> Use this file to discover all available pages before exploring further.

# KB Update Guide

> Step-by-step instructions for downloading and updating the SCANOSS  on-premise Knowledge Base (KB) via SFTP. Access credentials will be provided by email.

These instructions apply only to the **compressed KB format**.

If you are using an older **uncompressed format**, or are unsure which format you have,
download the full KB as described below, or contact
[SCANOSS support](mailto:support@scanoss.com) for assistance.

## Download the KB

### Connect Using the SFTP CLI

You can download the KB and its updates using **SFTP** with the authentication key provided.

Run the `sftp` command to download files to your current directory:

```bash theme={null}
sftp -P PORT USER@HOST
```

**Example**: Connect to the KB repository with user `SL000`:

```bash theme={null}
sftp -P 49322 SL000@sftp.scanoss.com
```

### Downloading Files

Once inside the interactive SFTP shell, you can download files using:

```bash theme={null}
sftp> get <file_path>
```

To download an entire directory, add the `-r` flag:

```bash theme={null}
sftp> get -r <directory_path>
```

Replace `<file_path>` and `<directory_path>` with the actual paths on the SFTP server.

**Examples**:

* Download all KB tables for version `23.04`:

```bash theme={null}
sftp> get -r ldb/compressed/full/23.04/oss/
```

* Download a monthly update (`23.05`):

```bash theme={null}
sftp> get -r ldb/compressed/updates/monthly/23.05
```

### Connect With an FTP Client

You can also configure an FTP client (e.g. FileZilla) to connect and download files.
Use the connection details provided by email.

<img src="https://mintcdn.com/scanoss/QpUtLiXoiWI24wVL/en/latest/installation/on-prem/deployment-guide/images/sftp-site-manager-setup.png?fit=max&auto=format&n=QpUtLiXoiWI24wVL&q=85&s=1fd38439cb814f1bc864c77a101b76e5" alt="sftp-site-manager-setup" width="611" height="513" data-path="en/latest/installation/on-prem/deployment-guide/images/sftp-site-manager-setup.png" />

## Updating the SCANOSS Platform

After downloading the update from the SFTP server, follow the instructions below based
on the update type.

### Types of KB Updates

#### Daily Updates

* Contain the full vulnerability table.
* Download the latest `YY.MM.DD_vulnerability.tar.gz` archive.
* Decompress and overwrite your current `ldb/oss/vulnerability` directory.

#### Intermediate Updates

* Released fortnightly, containing frequently updated components.
* Download `YY.MM_<No>.tar.gz` from `updates/intermediate`.
* Decompress the archive into a directory named `mined`, then import it into your
  Local Database (LDB).
* Intermediate updates are also included in the following month's monthly update.

#### Monthly Updates

* Released monthly, and include the intermediate updates from the previous month.
* Download the corresponding `YY.MM` directory from `updates/monthly`.
* Each update includes an instructions file, test files, and the latest KB statistics.

## Importing the KB Update

Each KB update directory includes an `update_instructions_YY.MM.txt` file with detailed
import instructions.

Refer to the instructions file included in the update directory, as the import process
and required LDB software version may vary between updates.
