psql¶
some psql / postgres commands you probably need every now and then
dump database¶
restore database¶
docker: dump database¶
docker: restore database¶
if you're upgrading and the databases aren't too large and a bit of downtime is ok:
docker compose down atuin # stop services
docker volume rm atuin_database # delete postgres volume
docker compose up -d postgresql # start just postgres
cat atuin_2025-09-29.sql | docker exec -i atuin-postgresql-1 psql -U atuin
k8s / kubernetes: dump database¶
single pod/container export:
multi pod/container export:
k8s / kubernetes: restore database¶
single pod/container import:
multi-pod import:
if you have a deployment / pod with multiple containers, patch the non-database containers to execute the sleep command so you can export the database properly:
kubectl patch deploy/miniflux -p '{
"spec":{"template":{"spec":{
"containers":[{"name":"miniflux","command":["sleep","infinity"]}]
}}}
}'
when the database has been restored, revert the patch:
and restore: