No description
  • Go 93.8%
  • Makefile 4.9%
  • Dockerfile 1.3%
Find a file
zemdregon ec2a61637a
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
chore(deps): bump actions/setup-go to v7 (#18)
* chore(deps): bump actions/setup-go to v7

Self-hosted CI workflows.

* ci: setup-go v7 + cache false
2026-08-10 19:37:56 -05:00
.github chore(deps): bump actions/setup-go to v7 (#18) 2026-08-10 19:37:56 -05:00
cmd/module feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
deploy feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
internal Advertise settings capability (v0.1.2). 2026-08-10 04:52:36 -05:00
muxcore/backup/v1 feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
proto/muxcore/backup/v1 feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
test Initial scaffold: MuxCore module starter template 2026-06-11 20:05:04 -05:00
.dockerignore Initial scaffold: MuxCore module starter template 2026-06-11 20:05:04 -05:00
.env.example feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
.gitignore feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
.golangci.yml test: Backupable peer-only round-trip and cut v0.1.0 (#13) 2026-08-09 20:10:22 -05:00
CHANGELOG.md Advertise settings capability (v0.1.2). 2026-08-10 04:52:36 -05:00
COMPATIBILITY.md test: Backupable peer-only round-trip and cut v0.1.0 (#13) 2026-08-09 20:10:22 -05:00
CONTRIBUTING.md feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
Dockerfile Initial scaffold: MuxCore module starter template 2026-06-11 20:05:04 -05:00
go.mod Add SettingsProvider for live backup_dir and source_dirs. (#14) 2026-08-10 03:46:30 -05:00
go.sum Add SettingsProvider for live backup_dir and source_dirs. (#14) 2026-08-10 03:46:30 -05:00
LICENSE Initial scaffold: MuxCore module starter template 2026-06-11 20:05:04 -05:00
Makefile feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
muxcore.json Advertise settings capability (v0.1.2). 2026-08-10 04:52:36 -05:00
README.md feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00
SECURITY.md feat: archive helpers, proto contracts, and module template alignment 2026-07-22 19:09:18 -05:00

Backup Local

CI Go Version License: GPL-3.0

Local filesystem backup/restore provider.

A MuxCore sidecar module that stores .tar.gz backups on the local filesystem and exposes create / restore / list / delete over gRPC (BackupService). Provides the backup / backup.local capabilities.


How It Works

CreateBackup ──→ collect source dirs + Backupable ExportState ──→ backups/<id>.tar.gz + index.json
RestoreBackup ──→ verify checksum ──→ safe untar into target_path ──→ optional ImportState

CreateBackup builds a real gzip-compressed tar. Contents come from:

  1. Configured source directories (BACKUP_SOURCE_DIRS) and/or per-request source_paths
  2. Registered Backupable peers (modules/<id>/state.bin via ExportState)

Empty archives are rejected (FailedPrecondition). Each backup records size and SHA-256 in index.json.

RestoreBackup requires target_path. It refuses missing archives, checksum mismatches, and path-traversal entries (../). After a safe extract, registered peers whose state is present in the archive receive ImportState.

Archive layout:

data/<source-name>/…     # filesystem sources
modules/<id>/state.bin   # Backupable exports

Configuration

Variable Default Description
BACKUP_DIR backups Directory for archives and index.json
BACKUP_SOURCE_DIRS (empty) Comma-separated directories included in every create
gRPC listen :9302 BackupService address
HTTP listen :9303 /health

Quick Start

make build

export MUXCORE_INSECURE_DISABLE_TLS=true
export BACKUP_SOURCE_DIRS=/var/lib/muxcore/data
./backup-local --muxcore-mesh-addr localhost:9090

gRPC surface

RPC Behavior
CreateBackup Write .tar.gz; return id, size, checksum, module ids
RestoreBackup Untar into target_path; error if archive missing
ListBackups Index entries, newest first
DeleteBackup Remove archive + index entry

Proto: proto/muxcore/backup/v1/backup.proto.


Capability

backup / backup.local — Local filesystem backup/restore

License

GPL-3.0