Skip to content

Setting up development environment

Orsiris de Jong edited this page Feb 19, 2025 · 4 revisions

Prerequisites

Having a python >= 3.7 interpreter installed. Most linux distributions will ship a python interpreter. For windows, you'd need to download and install one from https://python.org

Development environment

In order to test latest npbackup main git, you may setup a development environment as follows:

  1. Download latest npbackup main branch via git
git clone https://github.com/netinvent/npbackup

Alternatively, you can download the zip file from github and extract it into a dedicated folder {308C4CDE-FE31-4A2D-847E-934269AFDA51}

  1. Create a venv from your current python installation

Change directory into the git/downloaded npbackup directory and setup a virtual environment for Python

cd npbackup
python -m venv venv
  1. Setup NPBackup requirements for your virtual environment

On Linux:

venv/bin/python -m pip install -r npbackup/requirements.txt

On windows

venv\scripts\python.exe -m pip install -r npbackup\requirements.txt
  1. Install restic binaries

Once in your environment, you can install restic binaries with the following command:

On Linux

venv/bin/python RESTIC_SOURCE_FILES/update_restic.py

On Windows

venv\Scripts\python.exe RESTIC_SOURCE_FILES\update_restic.py
  1. Run NPBackup

On Linux

venv/bin/python bin/npbackup-gui

On Windows

venv\scripts\python.exe bin\npbackup-gui
Clone this wiki locally