Thread: Import 2GB .sql file

Import 2GB .sql file

From
Travis Harris
Date:
I have a 2GB sql file that I need to import.

It is a database backup, but I do not have the ability to get it in another format.

When I try to use the open file option in the query tool, it spins for a while but then brings up a blank text area with the file name as the tab name.

Is there some method to import this file?

Thank you.

Re: Import 2GB .sql file

From
Christophe Pettus
Date:

> On Jan 2, 2020, at 11:03, Travis Harris <travis@tapy.com> wrote:
>
> I have a 2GB sql file that I need to import.

You might try just importing it with psql; that's probably the most effective way of getting it done.

--
-- Christophe Pettus
   xof@thebuild.com




Re: Import 2GB .sql file

From
Patrick Headley
Date:
Is that a 2GB backup or data file? The methods to import the data will be different depending on what you are starting with.

Patrick Headley
Linx Consulting, Inc.
(303) 916-5522
pheadley@linxco-inc.com
www.linxco-inc.com

On 1/2/20 4:20 PM, Christophe Pettus wrote:

On Jan 2, 2020, at 11:03, Travis Harris <travis@tapy.com> wrote:

I have a 2GB sql file that I need to import.
You might try just importing it with psql; that's probably the most effective way of getting it done.

--
-- Christophe Pettus  xof@thebuild.com




Re: Import 2GB .sql file

From
Patrick Headley
Date:
Sorry, I missed some of the text from this email when I initially replied.

You should be able to find instructions for restoring an sql file at https://www.postgresql.org/.

Patrick Headley
Linx Consulting, Inc.
(303) 916-5522
pheadley@linxco-inc.com
www.linxco-inc.com

On 1/2/20 12:03 PM, Travis Harris wrote:
I have a 2GB sql file that I need to import.

It is a database backup, but I do not have the ability to get it in another format.

When I try to use the open file option in the query tool, it spins for a while but then brings up a blank text area with the file name as the tab name.

Is there some method to import this file?

Thank you.

Re: Import 2GB .sql file

From
Patrick Headley
Date:
psql instructions are at:

https://www.postgresql.org/docs/current/app-psql.html

Patrick Headley
Linx Consulting, Inc.
(303) 916-5522
pheadley@linxco-inc.com
www.linxco-inc.com

On 1/2/20 12:03 PM, Travis Harris wrote:
I have a 2GB sql file that I need to import.

It is a database backup, but I do not have the ability to get it in another format.

When I try to use the open file option in the query tool, it spins for a while but then brings up a blank text area with the file name as the tab name.

Is there some method to import this file?

Thank you.