chore: adopt pre-existing working-tree state before trunk merge

Uncommitted machine/session edits (live config, models, docs drift) were
blocking the merge of origin/main. Committed as-is to preserve them; the
merge that follows resolves overlapping prose files toward upstream
canonical, with local variants recoverable from this commit. Pre-merge
copies also in .AGENTTRASH/pre-merge-2026-10-18/.
This commit is contained in:
Frank committed 2026-10-18 16:46:57 -07:00
1 parent 8702f3058d
commit 3713339ffc
14 files changed
+378 -217

No files matched your search

+9 -10
View File
@@ -1,24 +1,23 @@
---
type: reference
title: Gitea Data Persistence
description: Gitea data persistence, volume mounts, ownership, and backup strategy on dankclaw.
description: Gitea data persistence, volume mounts, ownership, and backup strategy on dankclaw (Containers/gitea layout).
tags:
- gitea
- data
- unverified
verified: 2026-08-28
verified: 2026-10-18
---
# Gitea Data Persistence
All data lives on host bind mounts under `/opt/gitea/data/`. Containers are ephemeral. Quadlet stops remove the container (`podman run --rm --replace`). The next start recreates it. Data survives.
All data lives on host bind mounts under `/home/dank/Containers/gitea/` (fleet storage standard since 2026-09-01; quadlet units re-pointed from the old `/opt/gitea/data/` tree, which lingers on disk as a leftover — never write to it). Containers are ephemeral. Quadlet stops remove the container (`podman run --rm --replace`). The next start recreates it. Data survives.
## Volume Layout
| Host Path | Container Mount | Contents |
|---|---|---|
| `/opt/gitea/data/gitea-gitea/` | `/data` | Git repositories, avatars, attachments, LFS objects, `app.ini` |
| `/opt/gitea/data/gitea-postgres/` | `/var/lib/postgresql/data` | PostgreSQL WAL, tables, indexes |
| `/home/dank/Containers/gitea/data/` | `/data` (gitea-server) | Git repositories, avatars, attachments, LFS objects, `app.ini` |
| `/home/dank/Containers/gitea/postgres/` | `/var/lib/postgresql/data` (gitea-postgres) | PostgreSQL WAL, tables, indexes |
## Ownership
@@ -37,7 +36,7 @@ podman exec --user 1000 gitea-server sed -i 's/old/new/' /data/gitea/conf/app.in
Tar the entire data directory. This captures Gitea repos and PostgreSQL data in one archive.
```
tar czf gitea-backup-$(date +%F).tar.gz -C /opt/gitea data/
tar czf gitea-backup-$(date +%F).tar.gz -C /home/dank/Containers/gitea data/ postgres/
```
### PostgreSQL-only backup
@@ -48,17 +47,17 @@ Use `pg_dump` for a portable SQL dump. Useful for restoring to a different Postg
podman exec -e PGPASSWORD="$GITEA_DB_PASSWORD" gitea-postgres pg_dump -U gitea gitea > gitea-db-$(date +%F).sql
```
Set `PGPASSWORD` from `/opt/gitea/.env` (mode 0600).
Set `PGPASSWORD` from `/home/dank/Containers/gitea/env` (mode 0600, `GITEA_DB_PASSWORD`).
### Restore procedure
1. Stop the stack: `systemctl --user stop gitea-server gitea-postgres`
2. Restore data: `tar xzf backup.tar.gz -C /opt/gitea/`
2. Restore data: `tar xzf backup.tar.gz -C /home/dank/Containers/gitea/`
3. Start the stack: `systemctl --user start gitea-postgres gitea-server`
## Data Growth
- Git repositories grow with each commit and push. Monitor with `du -sh /opt/gitea/data/gitea-gitea/git/repositories/`.
- Git repositories grow with each commit and push. Monitor with `du -sh /home/dank/Containers/gitea/data/git/repositories/`.
- PostgreSQL WAL files accumulate. VACUUM via `podman exec gitea-postgres psql -U gitea -c "VACUUM;"`.
- Gitea's log files grow with usage.