- Shell 100%
| .env.example | ||
| .gitignore | ||
| build-and-upload.sh | ||
| README.md | ||
| setup-pi.sh | ||
Proxmox Backup Client – Build & Upload
Automates building the proxmox-backup-client package for arm64 from the community build scripts at wofferl/proxmox-backup-arm64 and uploading the resulting .deb to a OneRepo project.
Uploads are skipped when the same package name, version, and architecture are already present in the repository.
What this does
- Clones or updates the upstream build repository
- Reads the target version from
PROXMOX_BACKUP_VERin upstreambuild.sh - Queries the OneRepo API to check whether
proxmox-backup-clientat that version already exists - Builds the client package (or downloads a pre-built release) if needed
- Uploads the
.debto OneRepo and waits until it is published
Scripts
| Script | Purpose |
|---|---|
build-and-upload.sh |
Main script: build, version check, upload |
setup-pi.sh |
One-time setup for Raspberry Pi / native arm64 builds (dependencies, swap, Rust) |
.env.example |
Configuration template |
Quick start
cp .env.example .env
# Edit .env and set ONEREPO_TOKEN (and other values if needed)
chmod +x build-and-upload.sh setup-pi.sh
# Check whether a build/upload would run (no build, no upload)
./build-and-upload.sh --dry-run
# Build and upload
./build-and-upload.sh
Configuration
All settings are loaded from .env in the project root (see .env.example).
OneRepo
| Variable | Default | Description |
|---|---|---|
ONEREPO_URL |
https://repos.onesystems.ch |
OneRepo instance base URL |
ONEREPO_TOKEN |
(required) | API bearer token (or_…) with read and upload scope |
ONEREPO_PROJECT |
proxmox |
Project slug |
ONEREPO_CHANNEL |
stable |
Repository channel: stable, beta, nightly, or lts |
ONEREPO_REPOSITORY |
deb |
Repository type (deb, rpm, …) |
API documentation: repos.onesystems.ch/api/swagger
Build
| Variable | Default | Description |
|---|---|---|
UPSTREAM_REPO |
https://github.com/wofferl/proxmox-backup-arm64.git |
Upstream git repository |
UPSTREAM_BRANCH |
main |
Git branch (main = PBS 4.x / Trixie; stable-3 = PBS 3.x / Bookworm) |
BUILD_METHOD |
(auto) | native, docker, or download (see below) |
DOCKER_BASE_IMAGE |
debian:trixie-slim |
Base image for Docker builds |
PACKAGE_NAME |
proxmox-backup-client |
Debian package name to upload |
PACKAGE_ARCH |
arm64 |
Target architecture |
Security: Never commit .env — it is listed in .gitignore. Create tokens in the OneRepo UI with the minimum required scopes.
Build method auto-detection
If BUILD_METHOD is not set in .env:
- arm64 / aarch64 host (e.g. Raspberry Pi) →
native - other architectures (e.g. amd64) →
docker
Override explicitly in .env or via --method.
Usage
./build-and-upload.sh [options]
Options
| Option | Description |
|---|---|
--method docker|native|download |
Build strategy (overrides .env) |
--channel stable|beta|nightly|lts |
OneRepo channel for upload |
--dry-run |
Only check versions; do not build or upload |
--force-build |
Build even if the version already exists in OneRepo (upload is still skipped if present) |
-h, --help |
Show help |
Examples
# Default: auto-detect build method
./build-and-upload.sh
# Native build on Raspberry Pi
./build-and-upload.sh --method native
# Docker build on amd64 (requires docker buildx)
./build-and-upload.sh --method docker
# Download pre-built .deb from GitHub releases instead of compiling
./build-and-upload.sh --method download
# Upload to beta channel
./build-and-upload.sh --channel beta
# Version check only
./build-and-upload.sh --dry-run
Build methods
native (recommended on Raspberry Pi)
Compiles directly on the host using upstream ./build.sh client.
- On arm64: native compile
- On amd64: cross-compile via
./build.sh client cross
Compilation can take several hours. At least 4 GB RAM or RAM + swap is required.
Run ./setup-pi.sh once before the first native build on a Pi.
docker
Uses docker buildx with the upstream Dockerfile to produce arm64 packages. Default on non-arm64 hosts.
Requires Docker with buildx support. Cross-platform builds via QEMU can be very slow.
download
Downloads proxmox-backup-client_<version>_arm64.deb from the GitHub releases of wofferl/proxmox-backup-arm64 and uploads it. Fastest option when a matching release exists.
Raspberry Pi setup
Native builds without Docker are the recommended approach on a Raspberry Pi.
cd ProxmoxBackupClient
# One-time: install dependencies, configure swap, install Rust
./setup-pi.sh
cp .env.example .env
nano .env
./build-and-upload.sh --dry-run
./build-and-upload.sh
Pi requirements
| Topic | Requirement |
|---|---|
| OS | Debian Trixie for PBS 4.x (UPSTREAM_BRANCH=main). For Bookworm, set UPSTREAM_BRANCH=stable-3 |
| Memory | ≥ 4 GB RAM, or RAM + swap ≥ 4 GB (setup-pi.sh can configure 4 GB swap) |
| Raspberry Pi 5 | Add kernel=kernel8.img to /boot/firmware/config.txt (4K page size; required for PBS) |
| Build time | Typically 2–6 hours depending on the model |
Copy project to the Pi
# rsync from your dev machine
rsync -av --exclude upstream --exclude packages \
./ProxmoxBackupClient/ pi@raspberrypi:~/ProxmoxBackupClient/
Workflow diagram
clone upstream → read target version
↓
version in OneRepo? ──yes──→ exit (nothing to do)
↓ no
build / download .deb
↓
version in OneRepo? ──yes──→ skip upload
↓ no
upload to OneRepo → wait for publish
Output directories
| Path | Contents |
|---|---|
upstream/ |
Cloned wofferl/proxmox-backup-arm64 repository |
packages/ |
Built or downloaded .deb files |
Both are ignored by git (see .gitignore).
Troubleshooting
"Version already in repository"
The script is working as intended. A new upload happens only when upstream bumps PROXMOX_BACKUP_VER in build.sh.
Build fails with out-of-memory
Ensure total RAM + swap is at least 4 GB. Run ./setup-pi.sh or increase swap manually.
Debian version mismatch
PBS 4.x (main branch) targets Trixie. On Bookworm, set UPSTREAM_BRANCH=stable-3 in .env.
HTTP 409 on upload
The package version already exists in OneRepo. No duplicate upload is performed.
Rust not found
Run ./setup-pi.sh or install rustup manually and ensure ~/.cargo/env is available.
References
- wofferl/proxmox-backup-arm64 – upstream arm64 build scripts
- OneRepo API – package upload and management
- Proxmox Backup Server docs