I have database backup in format: dump.sql.gz (and chmod 777
on it)
I need to restore in another server
I logged via postgres and:
createdb newdb
gunzip < dump.sql.gz | psql newdb
All is going well, but at one moment I got this errors:
SET
SET
SET
CREATE EXTENSION
COMMENT
SET
SET
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
...
ALTER TABLE
CREATE INDEX
...
GRANT
GRANT
ERROR: permission denied for table categories
ERROR: permission denied for table categories
ERROR: permission denied for table categories
...
And after it restoring ends.
UPDATE:
from TOC entry 14923; 0 703831 MATERIALIZED VIEW DATA view_products myuser
pg_restore: error: could not execute query: ERROR: permission denied for table categories
Command was: REFRESH MATERIALIZED VIEW public.view_products;
What's going wrong? Please help