pg_restore from split files

Started by akp geekalmost 13 years ago6 messagesgeneral
Jump to latest
#1akp geek
akpgeek@gmail.com

Hi All -

I have created a dump of a big table into 5 split files. What is the
procedure to restore them using pg_dump.

I am getting the following error

pg_restore: [custom archiver] could not read from input file: end of file
pg_restore: *** aborted because of error

Appreciate your help.

Regards

#2Igor Neyman
ineyman@perceptron.com
In reply to: akp geek (#1)
Re: pg_restore from split files

How exactly did you create "split" dump?

Igor Neyman

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of akp geek
Sent: Monday, April 22, 2013 3:36 PM
To: pgsql-general
Subject: [GENERAL] pg_restore from split files

Hi All -

I have created a dump of a big table into 5 split files. What is the procedure to restore them using pg_dump.

I am getting the following error

pg_restore: [custom archiver] could not read from input file: end of file
pg_restore: *** aborted because of error

Appreciate your help.

Regards

#3akp geek
akpgeek@gmail.com
In reply to: Igor Neyman (#2)
Re: pg_restore from split files

pg_dump dbname -n schemaname -t table_name -Fc | split -b 500m -t table.dump

On Mon, Apr 22, 2013 at 3:41 PM, Igor Neyman <ineyman@perceptron.com> wrote:

Show quoted text

How exactly did you create “split” dump?****

** **

Igor Neyman****

** **

*From:* pgsql-general-owner@postgresql.org [mailto:
pgsql-general-owner@postgresql.org] *On Behalf Of *akp geek
*Sent:* Monday, April 22, 2013 3:36 PM
*To:* pgsql-general
*Subject:* [GENERAL] pg_restore from split files****

** **

Hi All -****

** **

I have created a dump of a big table into 5 split files. What is the
procedure to restore them using pg_dump.****

** **

I am getting the following error****

** **

pg_restore: [custom archiver] could not read from input file: end of file*
***

pg_restore: *** aborted because of error****

** **

Appreciate your help.****

** **

Regards****

#4Igor Neyman
ineyman@perceptron.com
In reply to: akp geek (#3)
Re: pg_restore from split files

I don't think pg_restore is able to deal with your split files.
What was the reasoning for doing this? Did you try first on smaller table/files to see if your dump/split/restore procedure would work?

Igor Neyman

From: akp geek [mailto:akpgeek@gmail.com]
Sent: Monday, April 22, 2013 3:47 PM
To: Igor Neyman
Cc: pgsql-general
Subject: Re: [GENERAL] pg_restore from split files

pg_dump dbname -n schemaname -t table_name -Fc | split -b 500m -t table.dump

On Mon, Apr 22, 2013 at 3:41 PM, Igor Neyman <ineyman@perceptron.com<mailto:ineyman@perceptron.com>> wrote:
How exactly did you create "split" dump?

Igor Neyman

From: pgsql-general-owner@postgresql.org<mailto:pgsql-general-owner@postgresql.org> [mailto:pgsql-general-owner@postgresql.org<mailto:pgsql-general-owner@postgresql.org>] On Behalf Of akp geek
Sent: Monday, April 22, 2013 3:36 PM
To: pgsql-general
Subject: [GENERAL] pg_restore from split files

Hi All -

I have created a dump of a big table into 5 split files. What is the procedure to restore them using pg_dump.

I am getting the following error

pg_restore: [custom archiver] could not read from input file: end of file
pg_restore: *** aborted because of error

Appreciate your help.

Regards

#5Steven Schlansker
steven@likeness.com
In reply to: akp geek (#3)
Re: pg_restore from split files

On Apr 22, 2013, at 12:47 PM, akp geek <akpgeek@gmail.com> wrote:

pg_dump dbname -n schemaname -t table_name -Fc | split -b 500m -t table.dump

Since you split the files outside of the Postgres world, you have to combine them again. Roughly,

cat table.dump.* > table.dump.combined
pg_restore --usual-arguments table.dump.combined

On Mon, Apr 22, 2013 at 3:41 PM, Igor Neyman <ineyman@perceptron.com> wrote:
How exactly did you create “split” dump?

Igor Neyman

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of akp geek
Sent: Monday, April 22, 2013 3:36 PM
To: pgsql-general
Subject: [GENERAL] pg_restore from split files

Hi All -

I have created a dump of a big table into 5 split files. What is the procedure to restore them using pg_dump.

I am getting the following error

pg_restore: [custom archiver] could not read from input file: end of file

pg_restore: *** aborted because of error

Appreciate your help.

Regards

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6akp geek
akpgeek@gmail.com
In reply to: Steven Schlansker (#5)
Re: pg_restore from split files

It works ... " combine them again. " Thank you all

Regards

On Mon, Apr 22, 2013 at 3:57 PM, Steven Schlansker <steven@likeness.com>wrote:

Show quoted text

On Apr 22, 2013, at 12:47 PM, akp geek <akpgeek@gmail.com> wrote:

pg_dump dbname -n schemaname -t table_name -Fc | split -b 500m -t

table.dump

Since you split the files outside of the Postgres world, you have to
combine them again. Roughly,

cat table.dump.* > table.dump.combined
pg_restore --usual-arguments table.dump.combined

On Mon, Apr 22, 2013 at 3:41 PM, Igor Neyman <ineyman@perceptron.com>

wrote:

How exactly did you create “split” dump?

Igor Neyman

From: pgsql-general-owner@postgresql.org [mailto:

pgsql-general-owner@postgresql.org] On Behalf Of akp geek

Sent: Monday, April 22, 2013 3:36 PM
To: pgsql-general
Subject: [GENERAL] pg_restore from split files

Hi All -

I have created a dump of a big table into 5 split files. What is

the procedure to restore them using pg_dump.

I am getting the following error

pg_restore: [custom archiver] could not read from input file: end of file

pg_restore: *** aborted because of error

Appreciate your help.

Regards