Object owner ship will vary between local and various remote environments. By default pg_restore will attempt to set the owner to roles which don't exist and throw an error. These errors are ignored and the restore seems to complete but it will output a non-zero exit code and cause lagoon-sync to not clean up:
pg_restore: error: could not execute query: ERROR: role "drupal" does not exist
Command was: ALTER SCHEMA public OWNER TO drupal;
pg_restore: error: could not execute query: ERROR: role "drupal" does not exist
Command was: ALTER TABLE public.foo OWNER TO drupal;
pg_restore: error: could not execute query: ERROR: role "drupal" does not exist
Command was: ALTER TABLE public.foo_id_seq OWNER TO drupal;
pg_restore: warning: errors ignored on restore: 3
Object owner ship will vary between local and various remote environments. By default
pg_restore
will attempt to set the owner to roles which don't exist and throw an error. These errors are ignored and the restore seems to complete but it will output a non-zero exit code and causelagoon-sync
to not clean up: