add new deploy script and cutting out pip as the installer

This commit is contained in:
2026-02-03 22:39:13 +01:00
parent f30d37632b
commit 7caaf46588
3 changed files with 152 additions and 70 deletions

View File

@@ -1,41 +1,54 @@
# pobsync
`pobsync` is a pull-based backup tool for sysadmins.
`pobsync` is a pull-based backup tool for sysadmins.
It creates rsync-based snapshots with hardlinking (`--link-dest`) and stores them centrally on a backup server.
Backups are **pulled over SSH**, not pushed, and are designed to be run from cron or manually.
---
Backups are pulled over SSH, not pushed, and are designed to be run from cron or manually.
* * *
## Design overview
- Runtime, config, logs and state live under **`/opt/pobsync`**
- Backup data itself is stored under a configurable **`backup_root`** (e.g. `/srv/backups`)
- Two snapshot types:
- **scheduled**
Participates in retention pruning (daily / weekly / monthly / yearly)
- **manual**
Kept outside the scheduled prune chain, defaults to hardlinking from the latest scheduled snapshot
- Minimal dependencies (currently only `PyYAML`)
---
* Runtime, config, logs and state live under `/opt/pobsync`
* Backup data itself is stored under a configurable `backup_root` (e.g. `/srv/backups`)
* Two snapshot types:
* scheduled
Participates in retention pruning (daily / weekly / monthly / yearly)
* manual
Kept outside the scheduled prune chain, defaults to hardlinking from the latest scheduled snapshot
* Minimal dependencies (currently only `PyYAML`)
* * *
## Requirements
- Python **3.11+**
- `rsync`
- `ssh`
- Root or sudo access on the backup server
- SSH keys already configured between backup server and remotes
* Python 3.11+
* `rsync`
* `ssh`
* Root or sudo access on the backup server
* SSH keys already configured between backup server and remotes
---
## Installation (system-wide, no venv)
* * *
## Installation (canonical runtime under /opt/pobsync, no venv)
This assumes you are installing as root or via sudo.
From the repository root:
1) Clone the repo
git clone https://code.hosting.hippogrief.nl/hippogrief/pobsync.git
cd pobsync
2) Deploy the runtime into `/opt/pobsync` (copies code into `/opt/pobsync/lib` and installs `/opt/pobsync/bin/pobsync`)
sudo ./scripts/deploy --prefix /opt/pobsync
3) Initialize runtime layout and global config
sudo /opt/pobsync/bin/pobsync install --backup-root /mnt/backups/pobsync
sudo /opt/pobsync/bin/pobsync doctor
## Updating
cd /path/to/pobsync
git pull
sudo ./scripts/deploy --prefix /opt/pobsync
sudo /opt/pobsync/bin/pobsync doctor
```bash
python3 -m pip install --upgrade pip
sudo python3 -m pip install .