I attempted to restore a PostgreSQL 9.5 database using this command:
pg_restore -C -d postgres -U postgres --no-owner --role=jsmith the_data.dump
Because the cluster I restored to is not the same as the cluster the dump was made on, some of the roles don't exist.
There were many errors during the restore, but all of them involved GRANT and RESTORE. Can I assume the actual data itself was restored without loss or modification?
The GRANT and REVOKE errors can be ignored. They don't effect the data load.
If you want to avoid the messages in future you can use the -x parameter on pg_restore (you can also use the synonyms --no-acl or --no-privileges
).
This stops pg_restore trying to set the grants.
pg_restore docs at https://www.postgresql.org/docs/current/static/app-pgrestore.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With