Live Borg debugging by exec-ing into the borg-web-ui Docker container. Use when debugging borg commands, writing tests against real borg output, developing borg 2.0 features, or verifying borg behavior before writing code.
72
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
High
Do not use without reviewing
You have direct access to a running borg-web-ui Docker container. Use this to run real borg/borg2 commands, inspect actual output, and use that ground truth to write code, tests, and fixes.
borg-web-uiborg (e.g. /usr/bin/borg or via PATH)borg2 (e.g. /usr/local/bin/borg2)/app/data (database, SSH keys, repos)borg (use gosu borg or su borg -c)Run commands inside the container using:
docker exec -it borg-web-ui <command>
# or as the borg user:
docker exec -u borg borg-web-ui <command>
# or for multi-step shell sessions:
docker exec borg-web-ui bash -c "<cmd1> && <cmd2>"When the user asks to debug, test, or develop borg functionality:
docker ps --filter name=borg-web-ui --format "{{.Names}} {{.Status}}"If it's not running, tell the user to start it: docker compose up -d
# Check borg versions available
docker exec borg-web-ui bash -c "borg --version 2>/dev/null; borg2 --version 2>/dev/null"
# Check what repos are configured (from DB or env)
docker exec borg-web-ui bash -c "ls /data/ 2>/dev/null"Run the exact borg command you need to test. Always capture both stdout and stderr:
docker exec -u borg borg-web-ui bash -c "BORG_PASSPHRASE='' borg list /path/to/repo 2>&1"
# For borg2:
docker exec -u borg borg-web-ui bash -c "BORG_PASSPHRASE='' borg2 rinfo /path/to/repo 2>&1"Key environment variables to set when running borg commands:
BORG_PASSPHRASE — passphrase (empty string if unencrypted)BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes — skip prompts for unencrypted reposBORG_RSH — custom SSH command if neededBORG_REMOTE_PATH — path to borg on remote (for SSH repos)After seeing the real output:
borg ... --json wherever possible)| Task | Borg 1 | Borg 2 |
|---|---|---|
| Init repo | borg init REPO | borg2 rcreate REPO |
| Repo info | borg info REPO | borg2 rinfo REPO |
| Delete repo | borg delete REPO | borg2 rdelete REPO |
| List archives | borg list REPO | borg2 list REPO |
| Archive info | borg info REPO::ARC | borg2 info REPO::ARC |
| Create | borg create REPO::ARC src/ | borg2 create REPO::ARC src/ |
| Extract | borg extract REPO::ARC | borg2 extract REPO::ARC |
| Prune | borg prune REPO | borg2 prune REPO |
| Compact | N/A (auto) | borg2 compact REPO (REQUIRED after delete/prune) |
| Check | borg check REPO | borg2 check REPO |
| Mount | borg mount REPO::ARC MNTPT | borg2 mount REPO::ARC MNTPT |
When you need a throwaway repo to test against:
# Create a temp repo (unencrypted for easy testing)
docker exec -u borg borg-web-ui bash -c "
BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes \
borg init --encryption=none /tmp/test-repo-1 2>&1 &&
echo 'test content' > /tmp/testfile.txt &&
borg create /tmp/test-repo-1::archive-1 /tmp/testfile.txt 2>&1 &&
borg list /tmp/test-repo-1 2>&1
"
# Same for borg2
docker exec -u borg borg-web-ui bash -c "
BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes \
borg2 rcreate --encryption=none /tmp/test-repo-2 2>&1 &&
echo 'test content' > /tmp/testfile.txt &&
borg2 create /tmp/test-repo-2::archive-1 /tmp/testfile.txt 2>&1 &&
borg2 list /tmp/test-repo-2 2>&1
"Always prefer --json flag to get structured output you can map directly to Python:
docker exec -u borg borg-web-ui bash -c "borg list --json /tmp/test-repo-1 2>&1"
docker exec -u borg borg-web-ui bash -c "borg info --json /tmp/test-repo-1::archive-1 2>&1"
docker exec -u borg borg-web-ui bash -c "borg2 rinfo --json /tmp/test-repo-2 2>&1"# Check what Python modules are available
docker exec borg-web-ui bash -c "cd /app && python3 -c 'from app.core.borg2 import *; print(\"ok\")'"
# Run a quick Python snippet against the live app
docker exec borg-web-ui bash -c "cd /app && python3 -c \"
import asyncio
from app.core.borg2 import borg2_rinfo
result = asyncio.run(borg2_rinfo('/tmp/test-repo-2'))
print(result)
\""After debugging, clean up temp repos:
docker exec borg-web-ui bash -c "rm -rf /tmp/test-repo-1 /tmp/test-repo-2 /tmp/testfile.txt"--json wherever possible — map the exact field names into Python dicts.2>&1.380827d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.