'Want to restore the postgres database on Cloud SQL using a sql file dump which is of 110GB and stored in the Google cloud storage

I am trying to restore the postgres database that I have setup on a Google Cloud SQL server and the backup file that I have created using pg_dump with custom format is stored in Cloud Storage in the bucket and of size around 110 GB. I have tested my restore command when the file is in the same directory in my postgres instance but it is not working whenever I am passing it using the gs url of the bucket. I have also tried to copy the file from bucket to directory but it is not working as there is not enough space even if I have allocated 300GB of SSD to the postgres instance. The command I am using to restore is for Directory that is working command:

pg_restore --verbose --no-acl --no-owner -Fc --host 35.231.137.82 --port 5432 --dbname=IDXGenerator_prod --username=postgres march_10_2022.sql_.gstmp

For Bucket url that is not working is :

pg_restore --verbose --no-acl --no-owner -Fc --host 35.231.137.82 --port 5432 --dbname=IDXGenerator_prod --username=postgres gs://sqltransferlargefile/march_10_2022.sql

Any suggestion or help is needed so that it can work from the cloud storage.enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source