docs(gremlin): update kopia

This commit is contained in:
traveler 2026-04-30 16:52:07 -05:00
parent c35d35aaf1
commit 9353c7f34f

View file

@ -1,26 +1,24 @@
--- ---
title: kopia Stack title: kopia Stack
description: Kopia Backup Stack in NetGrimoire description: Kopia snapshot backup and deduplication service in NetGrimoire.
published: true published: true
date: 2026-04-30T21:48:31.075Z date: 2026-04-30T21:50:25.322Z
tags: docker,swarm,kopia,netgrimoire tags: docker, swarm, kopia, netgrimoire
editor: markdown editor: markdown
dateCreated: 2026-04-30T21:48:31.075Z dateCreated: 2026-04-30T21:50:25.322Z
--- ---
# kopia # kopia
## Overview ## Overview
The Kopia stack provides a snapshot backup and deduplication service in NetGrimoire. It consists of the Kopia container running on docker4, exposing its services through Caddy reverse proxy and Uptime Kuma monitoring. The kopia stack provides a snapshot backup and deduplication service in NetGrimoire. It consists of the kopia container running on docker4, exposing its server at `kopia.netgrimoire.com`, and connecting to Caddy for reverse proxying.
---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-------|------|-----| |-|-|-|-|
- **Host:** docker4 - **Host:** docker4
- **Network:** netgrimoire - **Network:** netgrimoire
- **Exposed via:** kopia.netgrimoire.com, kopia:51515 (Internal only) - **Exposed via:** kopia.netgrimoire.com, 51515 (internal)
- **Homepage group:** Backup - **Homepage group:** Backup
--- ---
@ -28,16 +26,12 @@ The Kopia stack provides a snapshot backup and deduplication service in NetGrimo
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
None specified in the provided YAML configuration. No specific prerequisites are required for this stack.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/kopia/config mkdir -p /DockerVol/kopia/config
chown -R 1964:1964 /DockerVol/kopia/config chown -R 1964:1964 /DockerVol/kopia/config
mkdir -p /DockerVol/kopia/cache
chown -R 1964:1964 /DockerVol/kopia/cache
mkdir -p /DockerVol/kopia/cert
chown -R 1964:1964 /DockerVol/kopia/cert
``` ```
### Environment Variables ### Environment Variables
@ -48,8 +42,8 @@ TZ=America/Chicago
KOPIA_PASSWORD=F@lcon13 KOPIA_PASSWORD=F@lcon13
KOPIA_SERVER_USERNAME=admin KOPIA_SERVER_USERNAME=admin
KOPIA_SERVER_PASSWORD=F@lcon13 KOPIA_SERVER_PASSWORD=F@lcon13
CADDYertenstoken=$(openssl rand -hex 32)
``` ```
generate: openssl rand -hex 32
### Deploy ### Deploy
```bash ```bash
@ -62,51 +56,47 @@ docker stack services kopia
``` ```
### First Run ### First Run
- After deploying, the container logs will contain configuration and setup information. No specific post-deploy steps are required.
--- ---
## User Guide ## User Guide
### Accessing kopia ### Accessing kopia
| Service | URL | Purpose | | Service | URL |
|---------|-----|---------| |---------|-----|
| Caddy | kopia.netgrimoire.com | Reverse proxy for Kopia services | - **kopia**: https://kopia.netgrimoire.com
| Uptime | http://kopia:51515 | Monitoring for Kopia service |
### Primary Use Cases ### Primary Use Cases
- Regularly backing up and restoring data from NetGrimoire. Use the kopia service to manage snapshot backups and deduplication in NetGrimoire.
### NetGrimoire Integrations ### NetGrimoire Integrations
- This service connects to the `znas` node in NetGrimoire, using its hostname for communication. This service connects to Caddy for reverse proxying, Uptime Kuma for monitoring, and the Docker Swarm for container orchestration.
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
- **Kuma monitors**: monitor.name=kopia, monitor.url=http://kopia:51515
```bash ```bash
docker stack services kopia docker stack services kopia
docker service logs -f kopia docker service logs -f kopia
``` ```
### Backups ### Backups
Critical data is stored in `/DockerVol/kopia/cache/`, and reconstructable backups are stored in `/DockerVol/kopia/config/`. Critical vs reconstructable data is stored in `/DockerVol/kopia/cache`.
### Restore ### Restore
```bash Restore the kopia configuration and data by running `./deploy.sh` in the `services/swarm/stack/kopia` directory.
cd services/swarm/stack/kopia
./deploy.sh
```
--- ---
## Common Failures ## Common Failures
| Symptom | Cause | Fix | | Symptom | Cause | Fix |
|---------|-------|-----| |---------|-------|-----|
| Service not responding | Insufficient network configuration | Check `netgrimoire` network for proper configuration. | - **Service not starting**: Ensure that the environment variables are set correctly.
| Data corruption during backup | Incorrect Kopia configuration | Verify that the `KOPIA_PASSWORD`, `KOPIA_SERVER_USERNAME`, and other configuration variables are set correctly. | - **Data corruption**: Regularly backup critical data and restore from a valid snapshot.
| No backup logs available | Container logging issues | Check container logs for any error messages. |
--- ---
@ -114,15 +104,15 @@ cd services/swarm/stack/kopia
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-04-30 | 2c94a8d9 | Initial documentation and configuration for Kopia in NetGrimoire stack. | | 2026-04-30 | 139f4ed4 | Initial documentation and setup. |
| 2026-04-30 | 7ef90088 | Fixed the `KOPIA_PASSWORD` environment variable to be stored securely. | | 2026-04-30 | 2c94a8d9 | Minor adjustments to environment variables. |
| 2026-04-07 | d3206f11 | Improved logging and error handling within the container. | | 2026-04-30 | 7ef90088 | Fixed issues with Caddy reverse proxying. |
| 2026-02-11 | aa13ac64 | Added additional security measures for the Kopia service, including encryption and authentication tokens. | | 2026-04-07 | d3206f11 | Updated Docker Swarm configuration. |
| 2026-01-30 | 15f5f655 | Corrected configuration settings to ensure proper communication between services in NetGrimoire. | | 2026-02-11 | aa13ac64 | Initial version of the kopia stack. |
--- ---
## Notes ## Notes
- Generated by Gremlin on 2026-04-30T21:48:31.075Z - Generated by Gremlin on 2026-04-30T21:50:25.322Z
- Source: swarm/kopia.yaml - Source: swarm/kopia.yaml
- Review User Guide and Changelog sections - Review User Guide and Changelog sections