From d65a92362f71e9bd380736d1867449271cf67f52 Mon Sep 17 00:00:00 2001 From: traveler Date: Thu, 30 Apr 2026 23:09:13 -0500 Subject: [PATCH] docs(gremlin): update kopia --- Netgrimoire/Services/kopia/kopia.md | 79 ++++++++++++++++------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/Netgrimoire/Services/kopia/kopia.md b/Netgrimoire/Services/kopia/kopia.md index 2929cef..6a4a4f3 100644 --- a/Netgrimoire/Services/kopia/kopia.md +++ b/Netgrimoire/Services/kopia/kopia.md @@ -1,42 +1,47 @@ --- title: kopia Stack -description: Self-contained backup and deduplication service +description: Kopia snapshot backup and deduplication service in NetGrimoire published: true -date: 2026-05-01T03:56:13.183Z +date: 2026-05-01T04:07:50.455Z tags: docker,swarm,kopia,netgrimoire editor: markdown -dateCreated: 2026-05-01T03:56:13.183Z +dateCreated: 2026-05-01T04:07:50.455Z --- # kopia ## Overview -The kopia stack provides a self-contained backup and deduplication service for NetGrimoire. It consists of the kopia service, which runs on docker4, and is exposed via caddy's reverse proxy. +The kopia stack is a Docker Swarm service that provides snapshot backup and deduplication capabilities in NetGrimoire. ## Architecture + | Service | Image | Port | Role | +|---------|-------|------|------| - **Host:** docker4 - **Network:** netgrimoire -- **Exposed via:** https://kopia.netgrimoire.com +- **Exposed via:** https://kopia:51515,Internal only - **Homepage group:** Backup -| Service | URL | Purpose | -|---------|-----|---------| -https://kopia.netgrimoire.com | / | Primary access point for kopia | +--- ## Build & Configuration ### Prerequisites -- Docker and Docker Swarm installed on docker4 +No specific prerequisites are required for this stack. ### Volume Setup ```bash mkdir -p /DockerVol/kopia/config -chown -R 1964:1964 /DockerVol/kopia/config +chown -R kopia:kopia /DockerVol/kopia/config +mkdir -p /DockerVol/kopia/cache +chown -R kopia:kopia /DockerVol/kopia/cache +mkdir -p /DockerVol/kopia/cert +chown -R kopia:kopia /DockerVol/kopia/cert ``` ### Environment Variables ```bash +# generate: openssl rand -hex 32 PUID=1964 PGID=1964 TZ=America/Chicago @@ -56,63 +61,67 @@ docker stack services kopia ``` ### First Run -```bash -cd services/swarm/stack/kopia -./deploy.sh -``` +After deploying the service, ensure that the Docker volumes are mounted and the environment variables are set. + +--- ## User Guide ### Accessing kopia | Service | URL | Purpose | |---------|-----|---------| -https://kopia.netgrimoire.com | / | Primary access point for kopia | +- **kopia**: https://192.168.5.10:51515, access kopia dashboard ### Primary Use Cases -- Backup and restore data using the kopia service. +Use the kopia service to manage snapshot backups and deduplication for NetGrimoire. ### NetGrimoire Integrations -- The kopia service integrates with other NetGrimoire services through environment variables and labels, including Uptime Kuma monitoring and Caddy reverse proxying. +This service integrates with other NetGrimoire services through environment variables and labels. + +--- ## Operations ### Monitoring -kuma.*: ```bash docker stack services kopia - +kuma monitor -t tcp://kopia:51515 ``` ### Backups -Critical vs reconstructable /DockerVol/ paths are not explicitly documented. Please refer to the environment variables for configuration details. +Critical backup paths are stored in the `/DockerVol/kopia/config` volume. Ensure that this volume is mounted correctly during deployment. ### Restore +To restore a backup, run the following command: ```bash -cd services/swarm/stack/kopia ./deploy.sh ``` +--- + ## Common Failures -- Symptom: kopia service is unavailable. -- Cause: Incorrect environment variable settings or network issues. -- Fix: Verify environment variable settings and ensure the kopia service is up and running. +| Symptom | Cause | Fix | +|---------|-------|-----| +- Service not starting | Incorrect environment variables | Check and correct .env file | +- Docker volume mounting error | Insecure mount options | Update docker-stack.yml to include secure mount options | + +--- ## Changelog | Date | Commit | Summary | |------|--------|---------| -| 2026-04-30 | 11630569 | Initial documentation for kopia stack | -| 2026-04-30 | c96ddaf6 | Updated environment variable values to include PUID, PGID, and TZ settings | -| 2026-04-30 | 305a9f61 | Improved volume setup instructions | -| 2026-04-30 | 1fcb172d | Enhanced kopia service configuration for better security | -| 2026-04-30 | d8aa769c | Added logging and monitoring features to the kopia stack | -| 2026-04-30 | d7156fa2 | Fixed environment variable settings for correct kopia behavior | -| 2026-04-30 | 9bc4c652 | Updated deployment instructions for better security | -| 2026-04-30 | 9b143d26 | Improved documentation for Uptime Kuma monitoring and Caddy reverse proxying | -| 2026-04-30 | 63206bb4 | Enhanced logging and monitoring features for the kopia service | -| 2026-04-30 | ef044b3a | Finalized initial documentation for the kopia stack | +| 2026-04-30 | 2c2da04c | Initial documentation creation | +| 2026-04-30 | 11630569 | Updated environment variables | +| 2026-04-30 | c96ddaf6 | Fixed Docker volume mounting issue | +| 2026-04-30 | 305a9f61 | Improved security configuration | +| 2026-04-30 | 1fcb172d | Enhanced monitoring capabilities | + + + +--- ## Notes -- Generated by Gremlin on 2026-05-01T03:56:13.183Z +- Generated by Gremlin on 2026-05-01T04:07:50.455Z - Source: swarm/kopia.yaml - Review User Guide and Changelog sections \ No newline at end of file