When applying the pg_restore command, I kept getting an issue stating that the database name was not set. It seems that the following command was not doing anything:
export PGDATABASE=$TARGET_DATABASE_NAME
I updated the pg_restore call to the following which ended up fixing the issue:
When applying the
pg_restore
command, I kept getting an issue stating that the database name was not set. It seems that the following command was not doing anything:export PGDATABASE=$TARGET_DATABASE_NAME
I updated the
pg_restore
call to the following which ended up fixing the issue:pg_restore -v --no-owner --host="$TARGET_SERVER_NAME.postgres.database.azure.com" --port=5432 --username="$TARGET_USERNAME@$TARGET_SERVER_NAME" --dbname=$TARGET_DATABASE_NAME "$SOURCE_DATABASE_NAME.dump"
Is there any reason as to why this issue would come up?