Census against serverAppConfigs-docs + read-only ssh probes on both boxes (2026-10-18). Corrections to OURS, flags only for THEIRS: - Hardware drift: RTX 3090 moved dankserver->dankclaw 2026-09; dankserver now 2x Radeon AI PRO R9700 (Ryzen 7 7700X stays), 246 GiB RAM, no swap; dankclaw 121 GiB RAM + 64 GiB swap. Served: frank-archon radiance TP=2 (:7770 dankserver), frank-dragoon halogen NATIVE v2 (:7770 dankclaw iGPU), frank-zealot llama.cpp PrismML Ternary-Bonsai-2-27B PQ2_0 (:7771 dankclaw, 3090). Kernel 7.0.0-38 both; dankclaw :7770 no auth. - Gitea: gitea-caddy quadlet retired (fleet Caddy fronts the domain); data tree moved to /home/dank/Containers/gitea/ (2026-09-01 standard), /opt/gitea is a do-not-use leftover; LAN IP + live domain. - pi-era pages (core/settings, pi/models + role tables) demarcated as ARCHIVE with banners; llama-cpp fleet note modernized. - AGENTS.md machine-facts table corrected (it still routed prod warnings at frank-default-large). Their-side staleness flagged in the changelog entry for the operator, not edited: OMP Harness thresholdPercent 70 (live is 95), Ubuntu 24.04 OS table, 2026-09-03 stack mapping, superseded pi-KB backlink. Refs #5
69 lines
2.6 KiB
Markdown
69 lines
2.6 KiB
Markdown
---
|
|
type: reference
|
|
title: Gitea Data Persistence
|
|
description: Gitea data persistence, volume mounts, ownership, and backup strategy on dankclaw (Containers/gitea layout).
|
|
tags:
|
|
- gitea
|
|
- data
|
|
verified: 2026-10-18
|
|
---
|
|
|
|
# Gitea Data Persistence
|
|
|
|
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 |
|
|
|---|---|---|
|
|
| `/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
|
|
|
|
The bind-mount directories are owned by host user `dank` (UID 1000). Files that the containers create are owned by host UID/GID **100999** — the rootless ID mapping of container uid/gid 1000 (dank subuid range 100000-165535). User `dank` cannot write those files directly from the host.
|
|
|
|
Edit container-owned files inside the container:
|
|
|
|
```
|
|
podman exec --user 1000 gitea-server sed -i 's/old/new/' /data/gitea/conf/app.ini
|
|
```
|
|
|
|
## Backup Strategy
|
|
|
|
### Full backup (recommended)
|
|
|
|
Tar the entire data directory. This captures Gitea repos and PostgreSQL data in one archive.
|
|
|
|
```
|
|
tar czf gitea-backup-$(date +%F).tar.gz -C /home/dank/Containers/gitea data/ postgres/
|
|
```
|
|
|
|
### PostgreSQL-only backup
|
|
|
|
Use `pg_dump` for a portable SQL dump. Useful for restoring to a different PostgreSQL version.
|
|
|
|
```
|
|
podman exec -e PGPASSWORD="$GITEA_DB_PASSWORD" gitea-postgres pg_dump -U gitea gitea > gitea-db-$(date +%F).sql
|
|
```
|
|
|
|
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 /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 /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.
|
|
|
|
## See Also
|
|
|
|
- ](index.md) — index with management commands
|
|
- [[management|management]] — operations and boot persistence
|
|
- [[architecture|architecture]] — network and ports
|