Skip to content

Make the backupRun script path configurable (HOMELAB_BACKUP_SCRIPT) #130

Closed

Description

@TMHSDigital

Summary

homelab_backupRun always runs /opt/backup/backup.sh, while the compose dir, compose files, backup repo, ports and slugs are all configurable per node through HOMELAB_* settings.

Where

  • mcp-server/src/tools/backupRun.ts:11 (const BACKUP_SCRIPT = "/opt/backup/backup.sh";)

Proposal

Read setting(args.node, "HOMELAB_BACKUP_SCRIPT", "/opt/backup/backup.sh"), require an absolute path made of safe characters (reject anything else with a clear error), quote it in the command, and document it next to HOMELAB_BACKUP_REPO in mcp-server/README.md and .env.example.

Who benefits

Nodes whose backup script lives elsewhere (a NAS, or a wrapper used by a systemd timer).

Acceptance criteria

  • Per-node script path works and is covered by a command test.

Getting started

  • Relevant files: mcp-server/src/tools/backupRun.ts, mcp-server/src/utils/service-http.ts (setting helper)
  • How to run tests: cd mcp-server && npm install && npm test

Filed by repo-audit/full-audit at a59395f. Severity: low. Effort: S. audit-key: enhancement|mcp-server/src/tools/backupRun.ts|BACKUP_SCRIPT

Activity

  1. added
    enhancement
    good first issue
    severity: low
    on Nov 18, 2026
  2. TMHSDigital commented on Nov 18, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in c5443cc. homelab_backupRun reads HOMELAB_BACKUP_SCRIPT via nodeSetting() (default /opt/backup/backup.sh), rejects anything but an absolute safe-character path, quotes it, and names the setting in the not-found message. Documented in mcp-server/README.md and .env.example. Verified with handler tests for a per-node path and a rejected value (421 passing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuemcp-serverseverity: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions