Download the KB with kb-download.sh
kb-download.sh is the supported way to download the KB and its updates. It connects to
the SCANOSS SFTP server, lists the available versions, lets you pick one, checks you have
enough free disk space, and downloads it. It can fetch the full KB, a KB update,
the test KB, a SQLite KB snapshot, or an HFH KB snapshot.
Prerequisites
- lftp (recommended): provides parallel, resumable downloads. Install with
apt install lftp. If lftp is not installed, the script offers to fall back to the standardsftpclient. - sshpass (only needed for the
sftpfallback): install withapt install sshpass. Not required when using lftp. - SFTP credentials: host, port, username, and password, provided by the SCANOSS team by email.
Get the script
The script lives in the SCANOSS on-premise repository. Clone it (or pull the latest changes if you already have it) and make the scripts executable:Run it interactively
Run the script with no arguments for a fully guided session. It prompts for your connection details, the download mode, and the version:For long-running downloads (such as the full KB), we recommend running the script inside atmuxsession so the transfer survives a dropped connection. Start one withtmux new-session -s scanoss, run the script, then detach withCtrl+Bdand reattach later withtmux attach -t scanoss.
Run it non-interactively
Any prompt can be skipped by passing the matching flag. Add-y to accept defaults and
run without prompts (the connection flags -m, -h, -P, -u, -p are then required):
Run
./kb-download.sh -? for the complete set of flags (thread count, connection timeout,
compression, disk-space override, and path overrides). The full option reference and more
example sessions are in the
install README.
After downloading an update
A KB update download includes anldb-import.sh helper. After the download finishes, run
that script from inside the downloaded folder to import the update into your local database
(LDB):
ldb-import.sh when it finishes.
Do not interrupt the import. An interrupted import can corrupt the existing LDB.