Thanks for helping improve Backfort. This project protects recovery data, so a small change can affect whether a user can restore during an incident. Prefer small, reviewable changes with clear safety and recovery behavior.
- Read the README, the relevant Wiki source, and security policy.
- Search existing issues and code before proposing an interface or duplicate implementation.
- Use a disposable source directory, state directory, backup destination, and test bucket/container. Never develop against production data.
- Do not report a security vulnerability in a public issue; follow SECURITY.md instead.
Backfort targets Linux with Bash 4.3+, GNU userland, and Mike Farah yq v4.
The CI workflow documents the complete test environment; it also checks Bash
4.3 syntax. CodeQL reviews GitHub Actions definitions, OpenSSF Scorecard
publishes supply-chain findings, and a release tag is checked against the CLI
version and Changelog. Start with a syntax check and the main smoke test:
bash -n backfort.sh tests/*.sh
bash tests/smoke.shWhen available, also run ShellCheck:
shellcheck backfort.sh tests/*.shFor the optional Python/PyPI distribution, follow Python package development. Keep the root Bash engine as the only source and package its exact bytes; do not commit generated shell copies. Artifact checks include an isolated install, sdist rebuild and real Linux backup/recovery round trip.
Run the focused test for the changed surface. The suite includes quick backup, rclone, Docker Compose and its restore assistant, crypto/signing, watchdog, diff, pins, date-range deletion, interactive restore selection, notifications, lifecycle hooks, and Prometheus metrics:
bash tests/quick.sh
bash tests/rclone-smoke.sh
bash tests/compose-smoke.sh
bash tests/restore-compose.sh
bash tests/crypto-smoke.sh
bash tests/watchdog.sh
bash tests/diff.sh
bash tests/pinned.sh
bash tests/delete-period.sh
bash tests/pick.sh
bash tests/notify.sh
bash tests/hooks.sh
bash tests/metrics.shThe tests are intentionally hermetic: use their temporary fake Docker and rclone boundaries rather than live cloud storage.
GitHub Actions also runs a Documentation workflow for local Markdown links in the README, Wiki sources, examples, and community files. Keep public links relative when they point inside this repository so that check can protect them.
- One clear problem statement and a narrow implementation.
- A focused automated test covering the behavior and its meaningful failure path. Security and destructive-operation changes need negative tests too.
- A review of the recovery contract: incomplete bundles must remain unusable; restore remains staged; remote writes and deletes preserve commit-marker ordering.
- Documentation synchronized with the changed public behavior:
README.md,config.example.yaml, applicableexamples/, and the relevantwiki/pages. - An update to
SKILL.mdwhen scope, CLI, YAML, safety rules, tests, layout, or documentation routing changes.
- Keep Bash compatible with version 4.3 and preserve
set -Eeuo pipefailand the project's controlledIFSconvention. - Validate every external input at the boundary. Configuration is strict; unknown keys should not silently become defaults.
- Quote shell expansions. Do not introduce
eval, template-driven execution, or user-controlledbash -c/sh -c. - Never add passwords, cloud keys, encryption identities, database dumps, or production paths to commits, examples, fixtures, logs, or screenshots.
- Keep rclone operations narrow. Do not replace object-level publication with
a broad remote
sync.
Explain the user-visible behavior, safety implications, tests run, and any checks you could not run locally. Keep unrelated formatting or refactoring out of the same pull request. Maintainers may request a recovery scenario or a failure-path test before merging.
By contributing, you agree to follow the Code of Conduct and license your contribution under this repository's MIT License.