From 356c73d8546ad9ac6564551e92b0a404203e0f36 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 26 Oct 2026 10:33:02 -0700 Subject: [PATCH] case 4700 - docs: restore when AyaNova connects with its own PostgreSQL user pg_restore --no-owner --no-privileges --role=, so the restored tables belong to that user (otherwise the integrity check stops AyaNova). Co-Authored-By: Claude Opus 5.5 --- docs/8.0/ayanova/docs/ops-restore.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/8.0/ayanova/docs/ops-restore.md b/docs/8.0/ayanova/docs/ops-restore.md index 3228145b..94293149 100644 --- a/docs/8.0/ayanova/docs/ops-restore.md +++ b/docs/8.0/ayanova/docs/ops-restore.md @@ -139,6 +139,16 @@ pg_restore -U postgres -c -d AyaNova ~/downloads/db-20211212195504569.backup The restore will complete normally without any message if successful. +#### If AyaNova connects to PostgreSQL with its own user + +The examples above are for the default setup, where AyaNova connects to PostgreSQL as the `postgres` user (the `Username` in [AYANOVA_DB_CONNECTION](ops-config-db.md)). If you have set AyaNova up to connect as a different, dedicated PostgreSQL user, the restored tables must belong to that user: add `--no-owner --no-privileges --role=` followed by that user name to the restore command. For example, for a PostgreSQL user named `ayanova`: + +```bash +pg_restore -U postgres -c --no-owner --no-privileges --role=ayanova -d AyaNova ~/downloads/db-20211212195504569.backup +``` + +Without these options the restored tables belong to `postgres` and AyaNova will refuse to start with a database integrity error. + ### Linux server only - set ownershipt and permissions Before restarting the AyaNova server on Linux it will first be necessary to reset the ownership and permissions for the files and folders or AyaNova will not be able to write it's log, access attachments or generate reports properly.