You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1d64429
Browse filesBrowse the repository at this point in the historyBrowse files
| Protect files and directories on a schedule |[First backup](#first-backup--durable-setup)| A strict YAML job for cron or a systemd timer. |
39
41
| Take a fast snapshot before a risky change |[Quick file backup](#quick-file-backup)| A one-command backup plus a reusable non-secret recovery config. |
42
+
| Install the CLI with pip or pipx |[Python installation](#run-backfort-through-python-or-install-a-pypi-package)| The canonical Bash engine, bundled with a dependency-free Python launcher. |
40
43
| Run Backfort as a containerized job |[Run in Docker](#run-backfort-in-docker)| The same YAML plan and recovery format, with explicit persistent mounts. |
41
44
| Protect files on Kubernetes PVCs |[Run in Kubernetes](#run-backfort-in-kubernetes)| Helm Job/CronJob deployment with explicit read-only sources, durable state and isolated recovery. |
42
45
| Back up a Docker Compose stack |[Docker Compose sources](#docker-compose-sources)| Explicit project files, bind mounts, named volumes, and database dumps. |
@@ -74,6 +77,8 @@ destinations as a file backup.
74
77
## Features
75
78
76
79
- One Bash 4.3+ executable and one YAML configuration
80
+
- Optional Python 3.11+ launcher with pip/pipx packaging, `backfort` and
81
+
`python -m backfort` entry points; no Python runtime dependencies
77
82
- Strict configuration validation with unknown-key detection
78
83
- Full-file and directory backups with GNU tar include roots and excludes
79
84
- Helm deployment for Kubernetes PVC-file backups, manual recovery Jobs and
Alternatively, use pip inside a virtual environment:
150
+
151
+
```bash
152
+
python3 -m venv .venv
153
+
.venv/bin/python -m pip install 'backfort==1.3.0'
154
+
.venv/bin/backfort --version
155
+
.venv/bin/python -m backfort --help
156
+
```
157
+
158
+
Choose a new output filename (shell redirection overwrites files), edit the
159
+
config, then run `doctor` and a dry run before backing up. If `1.3.0` has not
160
+
reached your package index yet, run `.venv/bin/python -m pip install .` from
161
+
a trusted `v1.3.0` checkout instead. For privileged backups use a protected
162
+
installation; never run a user-writable virtual environment as root.
163
+
164
+
Direct execution from a checkout needs no Python package installation:
165
+
166
+
```bash
167
+
python3 run_backfort.py --version
168
+
python3 run_backfort.py -c /etc/backfort/config.yaml doctor
169
+
```
170
+
171
+
The launcher preserves arguments, environment, terminal, signals and engine
172
+
exit codes. It never downloads an engine or installs system tools. Native
173
+
Bash and Docker/Helm remain usable without Python. See
174
+
[Python and PyPI](wiki/Python-and-PyPI.md) for examples, tests, building and the
175
+
manual maintainer publishing procedure. Local build files are not evidence
176
+
that a package is already published.
177
+
128
178
## Run Backfort in Docker
129
179
130
180
The container image is an additional distribution method, not a second backup
@@ -133,8 +183,8 @@ creates the same portable bundles as a native installation. Images are
133
183
published for `linux/amd64` and `linux/arm64` to GitHub Container Registry:
134
184
135
185
```bash
136
-
docker pull ghcr.io/shellharbor/backfort:1.2.0
137
-
docker run --rm ghcr.io/shellharbor/backfort:1.2.0 --version
186
+
docker pull ghcr.io/shellharbor/backfort:1.3.0
187
+
docker run --rm ghcr.io/shellharbor/backfort:1.3.0 --version
138
188
```
139
189
140
190
For a durable setup, copy the sample Compose file and its matching config into
@@ -176,8 +226,8 @@ mounted read-only. Use it only for a trusted Compose job and never for a
176
226
normal files-only backup. The complete deployment, secret, recovery and
177
227
upgrade guidance is in [Docker deployment](wiki/Docker-Deployment.md).
178
228
179
-
Release tags are immutable exact versions such as `1.2.0`. Stable releases
180
-
also move `1.2`, `1`, and `latest`; pin an exact version or digest for a
229
+
Release tags are immutable exact versions such as `1.3.0`. Stable releases
230
+
also move `1.3`, `1`, and `latest`; pin an exact version or digest for a
181
231
repeatable run and retain the `backfort-state` volume during upgrades. Docker
182
232
Hub publication is optional and occurs only when the repository has both
183
233
`DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` release secrets; GHCR is the
@@ -1461,12 +1511,14 @@ Backfort's badges point to checks that are actually tracked in the repository:
1461
1511
| Guardrail | What it protects |
1462
1512
| --- | --- |
1463
1513
| [CI](.github/workflows/ci.yml) | Bash syntax and runtime on Bash 4.3, ShellCheck, YAML examples, the hermetic suite, and a real PostgreSQL/MySQL Compose backup-and-recovery round trip. |
1514
+
| [Python package](.github/workflows/python-package.yml) | Python 3.11–3.14/Linux and the Windows boundary, complete launcher branch coverage, wheel/sdist metadata, isolated installation and real installed-package backup/recovery. |
1464
1515
| [Kubernetes](.github/workflows/kubernetes.yml) | Helm rendering/safety gates and real-image PVC backup, full verification, metadata recovery, cross-Job locking and non-root operation in an isolated kind cluster. |
1465
1516
| [Documentation](.github/workflows/documentation.yml) | Internal Markdown links across the README, Wiki sources, examples, and community documents, plus whitespace in changed files. |
1466
1517
| [CodeQL](.github/workflows/codeql.yml) | GitHub Actions workflow analysis on pull requests, `main`, and a weekly schedule. |
1467
1518
| [OpenSSF Scorecard](.github/workflows/scorecard.yml) | A weekly supply-chain review published to GitHub code scanning. |
1468
1519
| [Release metadata](.github/workflows/release-metadata.yml) | A `vX.Y.Z` tag must match the CLI version and the Changelog before release work proceeds. |
| [Publish Python package](.github/workflows/pypi-publish.yml) | Manual, matching-tag-only TestPyPI/PyPI publishing with OIDC and separate named environments; ordinary CI never uploads a release. |
0 commit comments