mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-04 17:00:59 +02:00
973bf23fe8
Move scattered configuration tables and operational sections out of the README into dedicated reference documents: - docs/configuration.md: single source of truth for all environment variables, grouped into 12 sections (Common, Database, Caching, Collector, Webhooks, Auth, Data Retention, API, Web Dashboard, Feature Flags, Traefik, Prometheus & Alertmanager) - docs/deployment.md: production setup, reverse proxy, multi-instance, API scaling, Redis caching - docs/observer.md: remote observers plus PACKETCAPTURE_* and SERIAL_PORT reference - docs/maintenance.md: backup and restore README is reduced from 712 to 385 lines; the ARM32/Raspberry Pi note is dropped. database.md, auth.md, webhooks.md, and content.md have their env-var tables removed and link back to configuration.md. Stale cross-references in database.md, upgrading.md, and .env.example are updated to point at the new locations.
36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# Maintenance
|
|
|
|
This document covers operational maintenance tasks for MeshCore Hub. For routine data-retention cleanup of old events and inactive nodes, see [configuration.md → Data Retention](configuration.md#data-retention).
|
|
|
|
## Backup & Restore
|
|
|
|
### Using Makefile
|
|
|
|
```bash
|
|
# Back up all volumes to backup/
|
|
make backup
|
|
|
|
# Restore a specific volume
|
|
make restore FILE=backup/hub_data-20260414-120000.tar.gz
|
|
```
|
|
|
|
### Using shell commands
|
|
|
|
```bash
|
|
# Back up the database volume
|
|
source .env 2>/dev/null || true
|
|
mkdir -p backup
|
|
vol=${COMPOSE_PROJECT_NAME:-hub}_data
|
|
docker run --rm -v $vol:/data -v $(pwd)/backup:/backup \
|
|
alpine tar czf /backup/$vol-$(date +%Y%m%d-%H%M%S).tar.gz -C / data
|
|
|
|
# Restore a specific volume (volume name derived from tarball filename)
|
|
source .env 2>/dev/null || true
|
|
FILE=backup/${COMPOSE_PROJECT_NAME:-hub}_data-20260414-120000.tar.gz
|
|
vol=$(basename "$FILE" | sed 's/-[0-9]\{8\}-[0-9]\{6\}\.tar\.gz//')
|
|
docker run --rm -v $vol:/data -v $(pwd)/backup:/backup \
|
|
alpine sh -c "cd / && tar xzf /backup/$(basename $FILE)"
|
|
```
|
|
|
|
> **Note:** Replace `hub` with your `COMPOSE_PROJECT_NAME` if using a different instance name. Monitoring infrastructure (Prometheus, Alertmanager) manages its own data — consult your monitoring stack's documentation for backup procedures.
|