How leistnerm/configbackup works
ConfigBackup is a one-shot, configuration-driven utility for capturing files and generated artifacts, versioning changes, and maintaining filesystem or Git history. Its main workflow is: an operator starts a run, ConfigBackup loads and validates YAML, runs configured preparation tasks, collects matching sources, then stores changed snapshots and applies retention while recording state and manifests. Optional PostgreSQL, SQL Server, and guest-system collectors produce current-state trees for that workflow to archive. Internal stages are inferred from the documented behavior and sampled excerpts; unsampled subsystem wiring is represented only where the README documents it.
Main entry points: configbackup.py Task execution · collect_postgresql.py PostgreSQL collector · Collect-SqlServerConfiguration.ps1 SQL Server collector · collect_system.py Guest-system collector
Components 21
Run orchestration
- Run entry and CLI
configbackup.py - Config loading
configbackup.py - Task execution
configbackup.py
Capture and collectors
- PostgreSQL collector
collectors/postgresql/collect_postgresql.py - SQL Server collector
collectors/sqlserver/Collect-SqlServerConfiguration.ps1 - Guest-system collector
collectors/system/collect_system.py - Generated artifact trees
Archive lifecycle
- Source discovery
configbackup.py - Change detection and versions
configbackup.py - Retention and deletion
configbackup.py - Run state and manifests
configbackup.py
Storage backends
- Filesystem archive
configbackup.py - Git history
configbackup.py
Other components
- Operator or scheduler
- YAML configuration
configbackup.example.yaml - Files and directories
- PostgreSQL client tools
- SqlPackage and dbatools
- Host OS and commands
- Git remote
- GitHub PR service
Connections 25
- Operator or scheduler → Run entry and CLI: starts run
- YAML configuration → Config loading: provides settings
- Run entry and CLI → Config loading: loads configuration
- Config loading → Task execution: configures tasks
- Task execution → PostgreSQL collector: runs collector
- Task execution → SQL Server collector: runs collector
- Task execution → Guest-system collector: runs collector
- PostgreSQL collector → PostgreSQL client tools: invokes
- SQL Server collector → SqlPackage and dbatools: invokes
- Guest-system collector → Host OS and commands: queries
- PostgreSQL collector → Generated artifact trees: writes inventory
- SQL Server collector → Generated artifact trees: writes inventory
- Guest-system collector → Generated artifact trees: writes inventory
- Task execution → Source discovery: provides tasks
- Files and directories → Source discovery: matched by
- Generated artifact trees → Source discovery: matched by
- Source discovery → Change detection and versions: supplies files
- Change detection and versions → Filesystem archive: writes versions
- Change detection and versions → Git history: updates snapshot
- Change detection and versions → Run state and manifests: records versions
- Retention and deletion → Filesystem archive: prunes versions
- Retention and deletion → Run state and manifests: updates history
- Run entry and CLI → Retention and deletion: runs prune
- Git history → Git remote: pushes commits
- Git history → GitHub PR service: creates or updates PR