No description
Find a file
2026-04-13 21:11:28 +02:00
community_backup added DATABASES setting 2026-04-13 21:11:28 +02:00
.gitignore Updated the HTML context of some views. 2026-04-13 20:09:27 +02:00
LICENSE Added LICENSE 2026-04-04 15:08:46 +02:00
pyproject.toml added gunicorn dependencies 2026-04-06 21:36:48 +02:00
README.md added DATABASES setting 2026-04-13 21:11:28 +02:00
uv.lock initial commit 2026-04-04 15:07:37 +02:00

Community Backup

A website to manage backup repositories.

Installation

This installation guide assumes a Debian 13 system.

Install Python and several dependencies:

This example should wo

apt update && apt install python3 python3-pip python3-venv borgbackup

Clone the repository

git clone https://git.srvspace.net/jo/community-backup.git

Or install from a release

Create a venv

python3 -m venv venv

Activea the venv

source venv/bin/activate

Install the package and it's dependencies:

pip install -e community-backup

Create a configuration file in community_backup/community_backup/community_backup/configration.py, e.g. by copying and adjusting the example_configuraton.py next to that location.

The settings are explained in detail in the setting section.

Apply the migrations:

python community-backup/community_backup/manage.py migrate

Collect the static files:

# python community-backup/community_backup/manage.py collectstatic

130 static files copied to '/opt/community_backup/static'.

Point your webserver to the static files. E.g. with caddy:

example.backups.org {
	handle /static/* {
		file_server {
			root /opt/community_backup/
		}
	}

	handle {
		reverse_proxy http://localhost:8000
	}
}

Create a superuser account


Settings

BACKUP_USER

BACKUP_USER specifies the username, that is used for borg backups. This user is used for various file permissions as well as the user that clients are using to log in and push their backups.

BACKUP_REPO_HOST

BACKUP_REPO_HOST is the hostname given to the user for pushing their backups to. E.g. backup.example.com.

BACKUP_HOME_DIR

BACKUP_HOME_DIR is the home directory of the borg user. This must be a pathlib.Path.

BACKUP_BORG_DIR

BACKUP_BORG_DIR is the directory in which the actual backups are stored. This must be a pathlib.Path

BACKUP_AUTHORIZED_KEYS

BACKUP_AUTHORIZED_KEYS is the authorized_keys file of the SSH daemon used for BORG_USER. This must be a pathlib.Path

DATABASES

DATABASES is the Django database setting. Here is an example for sqlite3.

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": "/some/path/to/db.sqlite3",
    }
}