Struggling to import file into Postgresql

21 views
Skip to first unread message

Lachlan Macdonald

unread,
May 6, 2019, 7:13:05 PM5/6/19
to Google Cloud SQL discuss
Hi all, 

I'm new to SQL and am trying to import a .tar file into a sql instance.  I'm getting error messages it's not the correct format.  Does anyone know how I could go about importing this .tar file?

Thanks, 

Lachlan

Harmit Rishi (Cloud Platform Support)

unread,
May 13, 2019, 8:52:13 PM5/13/19
to Google Cloud SQL discuss
Hello, 

Generally, you would have to create a SQL dump file when you are trying to import data into Cloud SQL. This process consists of creating a storage bucket and uploading the dump file in the bucket before import into Cloud SQL. For the purpose of clarity, would you be able to confirm if the process you are using to import the data fulfills the requirements found here? This link also includes steps to import data into a Cloud SQL instance. 

Also, in regards to your specific question, my research indicates that .tar files are normally used by Linux/ Unix systems. These files are only meant for storing data and not compressing it. This could be the reason why you are encountering the error message you are referring to. I was able to find out that the the supported compressed file format for Cloud SQL is .GZ. You may compress your .tar file in order to make it into the supported file format for your import action. For further information regarding .tar files, you may consult this third party documentation here.

I hope this helps!
Reply all
Reply to author
Forward
0 new messages