Local Git Checkpoints
This runbook keeps isp-status versioned without requiring a remote Git host.
Use this workflow when the live server is the authoritative repo and remote credentials or upstream hosting are intentionally not in use.
Policy
- Commit source changes locally on
/opt/isp-status. - Keep runtime output out of Git.
- Export a portable Git bundle after each known-good commit.
- Store the bundle and its SHA-256 checksum somewhere outside the server.
- Do not reconnect a remote until credentials and repository ownership have been reviewed.
Ignored Paths
The repo should ignore generated and runtime paths:
venv/
__pycache__/
*.pyc
backups/
*.pre-*
static.pre-*/
templates.pre-*/
Check Status
sudo git -C /opt/isp-status status --short
sudo git -C /opt/isp-status branch --show-current
sudo git -C /opt/isp-status log --oneline -5
Commit Source Changes
Stage only application source, templates, static assets, docs, and config files that are meant to be versioned.
sudo git -C /opt/isp-status add \
.gitignore \
app.py client_ip.py config.py docs_api.py health_api.py history_api.py \
history_sqlite.py sqlite_resilient.py requirements.txt \
static/css/app.css static/js/app.js static/js/base.js static/js/history.js \
"static/docs/user guide.md" static/docs/runbooks/local-git-checkpoints.md \
templates/base.html templates/doc.html templates/health.html templates/history.html
sudo git -C /opt/isp-status status --short
sudo git -C /opt/isp-status commit -m "Describe the change"
Adjust the git add list to match the files actually changed.
Create A Portable Bundle
sudo mkdir -p /opt/isp-status/backups/git
stamp="$(date -u +%Y%m%d-%H%M%SZ)"
sudo git -C /opt/isp-status bundle create \
"/opt/isp-status/backups/git/isp-status-${stamp}.bundle" --all
sudo sha256sum "/opt/isp-status/backups/git/isp-status-${stamp}.bundle" | \
sudo tee "/opt/isp-status/backups/git/isp-status-${stamp}.bundle.sha256"
The bundle is a portable copy of the Git history. Copy both files to offline storage or the project vault.
Verify A Bundle
sha256sum -c /path/to/isp-status-YYYYMMDD-HHMMSSZ.bundle.sha256
git bundle verify /path/to/isp-status-YYYYMMDD-HHMMSSZ.bundle
Restore From A Bundle
sudo mkdir -p /opt
sudo git clone /path/to/isp-status-YYYYMMDD-HHMMSSZ.bundle /opt/isp-status
sudo chown -R root:root /opt/isp-status
Then continue with the normal rebuild procedure: create runtime directories, apply permissions, install systemd units, and run health checks.
Current Checkpoint Example
The current known-good local checkpoint is:
/opt/isp-status/backups/git/isp-status-20260516-085206Z.bundle
sha256: 4beb310f11bb6cfb37cc76e31283ac198894a373d315bc42d527e63e5cb7ea74