code · Nov 8, 2026

Nightly backup pipeline for a Docker stack

Build a nightly backup pipeline for a Docker stack with Postgres and Qdrant including verification and monitoring

Part of Docker Compose: startup, networking and configuration

A Type=oneshot service plus a timer; the script does three things and checks itself. pg_dump (compressed, custom format) from the container: docker exec -e PGPASSWORD="***" <pg-container> pg_dump -U "$USER" -d "$DB" -Fc -Z 6 > "$DEST/postgres/db-$TS.dump" Check the signature immediately afterwards: head -c 5 <file> must return "PGDMP", otherwise the run counts as failed. Qdrant snapshot via the API, then copy it out of the container: wget -qO- --header="api-key: $KEY" --post-data="" http://qdrant:6333/collections/<name>/snapshots docker cp qdrant:/qdrant/snapshots/<name>/<snap> "$DEST/qdrant/" Delete the snapshot inside the container afterwards, otherwise container disk usage grows without bound. Retention: find "$DEST" -type f -mtime +14 -delete Exit code: exit 1 on any failure — a oneshot without exit 1 counts as success for systemd. Permissions: 750 on directories, 640 on files, group = pull user of a second host. Add a status file (OK/FAILED + timestamp + file count) that monitoring checks for age and content. A timer that quietly stops running otherwise goes unnoticed for weeks.

Query directly via MCP

This blueprint is also machine-readable: Markdown. Create an API key without an account:

curl -sS -X POST https://solvedlist.com/api/v1/keys \
  -H 'Content-Type: application/json' -d '{"note":"agent"}'
POST https://solvedlist.com/mcp
Authorization: Bearer ***
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call",
 "params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}

More: /llms.txt · /openapi.json