Files
docker-compose/restic/compose.yaml
Sebastian Krüger fcfe508698 docs: document automated backup configuration
Updated documentation to reflect complete backup setup:

**CLAUDE.md Updates:**
- Added detailed repository configuration (hidrive-backup)
- Documented all 11 backup plans with schedules and retention
- Explained volume mounting strategy with prefixed names
- Added configuration management instructions
- Included maintenance schedule (weekly prune/check)

**README.md Updates:**
- Added "Backup Operations" section with CLI commands
- Documented automated backup schedule (2-8 AM daily)
- Added backup protocol to security section
- Updated mission status with backup system indicator
- Included next backup time and repository status

**compose.yaml Updates:**
- Restored backrest_config volume (needed for proper operation)
- Removed direct config.json mount (causes write conflicts)
- Config copied into volume after container start

All 11 backup plans now documented:
- postgres, redis, directus (uploads/bundle)
- awesome, gotify, scrapy, n8n
- filestash, linkwarden, letsencrypt

Retention policies range from 3-12 months with yearly backups
for critical data (postgres, directus, letsencrypt).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 10:40:28 +01:00

112 lines
4.0 KiB
YAML

services:
backrest:
image: ${RESTIC_IMAGE:-garethgeorge/backrest:latest}
container_name: ${RESTIC_COMPOSE_PROJECT_NAME}_app
restart: unless-stopped
hostname: ${RESTIC_HOSTNAME:-falcon}
volumes:
# Backrest application data
- backrest_data:/data
- backrest_config:/config
- backrest_cache:/cache
- backrest_tmp:/tmp
# Backup destination
- ${RESTIC_BACKUP_PATH:-/mnt/hidrive/users/valknar/Backup}:/repos
# Docker volumes to backup (read-only)
- backup_core_postgres_data:/volumes/core_postgres_data:ro
- backup_core_redis_data:/volumes/core_redis_data:ro
- backup_directus_uploads:/volumes/directus_uploads:ro
- backup_directus_bundle:/volumes/directus_bundle:ro
- backup_awesome_data:/volumes/awesome_data:ro
- backup_gotify_data:/volumes/gotify_data:ro
- backup_scrapyd_data:/volumes/scrapyd_data:ro
- backup_scrapy_code:/volumes/scrapy_code:ro
- backup_n8n_data:/volumes/n8n_data:ro
- backup_filestash_data:/volumes/filestash_data:ro
- backup_linkwarden_data:/volumes/linkwarden_data:ro
- backup_linkwarden_meili_data:/volumes/linkwarden_meili_data:ro
- backup_letsencrypt_data:/volumes/letsencrypt_data:ro
environment:
TZ: ${TIMEZONE:-Europe/Berlin}
BACKREST_DATA: /data
BACKREST_CONFIG: /config/config.json
XDG_CACHE_HOME: /cache
TMPDIR: /tmp
networks:
- compose_network
labels:
- 'traefik.enable=${RESTIC_TRAEFIK_ENABLED}'
- 'traefik.http.middlewares.${RESTIC_COMPOSE_PROJECT_NAME}-redirect-web-secure.redirectscheme.scheme=https'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web.middlewares=${RESTIC_COMPOSE_PROJECT_NAME}-redirect-web-secure'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web.rule=Host(`${RESTIC_TRAEFIK_HOST}`)'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web.entrypoints=web'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web-secure.rule=Host(`${RESTIC_TRAEFIK_HOST}`)'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web-secure.tls.certresolver=resolver'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web-secure.entrypoints=web-secure'
- 'traefik.http.middlewares.${RESTIC_COMPOSE_PROJECT_NAME}-web-secure-compress.compress=true'
- 'traefik.http.routers.${RESTIC_COMPOSE_PROJECT_NAME}-web-secure.middlewares=${RESTIC_COMPOSE_PROJECT_NAME}-web-secure-compress'
- 'traefik.http.services.${RESTIC_COMPOSE_PROJECT_NAME}-web-secure.loadbalancer.server.port=9898'
- 'traefik.docker.network=${NETWORK_NAME}'
- 'com.centurylinklabs.watchtower.enable=${WATCHTOWER_LABEL_ENABLE}'
volumes:
backrest_data:
name: ${RESTIC_COMPOSE_PROJECT_NAME}_data
backrest_config:
name: ${RESTIC_COMPOSE_PROJECT_NAME}_config
backrest_cache:
name: ${RESTIC_COMPOSE_PROJECT_NAME}_cache
backrest_tmp:
name: ${RESTIC_COMPOSE_PROJECT_NAME}_tmp
# External volumes from other stacks (read-only mounts)
backup_core_postgres_data:
name: core_postgres_data
external: true
backup_core_redis_data:
name: core_redis_data
external: true
backup_directus_uploads:
name: core_directus_uploads
external: true
backup_directus_bundle:
name: core_directus_bundle
external: true
backup_awesome_data:
name: awesome_data
external: true
backup_gotify_data:
name: messaging_gotify_data
external: true
backup_scrapyd_data:
name: scrapy_scrapyd_data
external: true
backup_scrapy_code:
name: scrapy_scrapy_code
external: true
backup_n8n_data:
name: n8n_n8n_data
external: true
backup_filestash_data:
name: stash_filestash_data
external: true
backup_linkwarden_data:
name: links_data
external: true
backup_linkwarden_meili_data:
name: links_meili_data
external: true
backup_letsencrypt_data:
name: proxy_letsencrypt_data
external: true
networks:
compose_network:
name: ${NETWORK_NAME}
external: true