From: | Garo Hussenjian <garo(at)xapnet(dot)com> |
---|---|
To: | Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Dump / restore question |
Date: | 2002-12-31 06:48:51 |
Message-ID: | BA367DD3.6000%garo@xapnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Update:
This time I used:
"pg_dump -F t -d db_name -f dump_file.tar"
I no longer get the archiver error, but when restoring with:
"pg_restore -r -x -v -F t -d db_name -f dump_file.tar"
The process has been running for a half hour but barely (0.0 %CPU 0.0 %MEM
0:00.01 TIME)... Shouldn't there be more activity? If I log into the
database using psql, there are no relations showing.
Any ideas what I'm doing wrong?
Garo.
on 12/30/02 9:44 PM, Garo Hussenjian at garo(at)xapnet(dot)com wrote:
> Hello all,
>
> Happy New Year's Eve Eve!
>
> I am curious if anyone knows offhand how to dump/restore a database without
> indexes and how to dump/restore just the indexes without the database...
>
> I am asking because it is taking many hours to restore a 115 Meg dump file
> and I have to do it again tomorrow, while not having so many hours to do it!
> I have only primary key constraints and several indexes, but no foreign key
> constraints, so I'm mainly concerned with the indexes.
>
> I tried "pg_restore --rearrange dump_file" but I get the error:
>
> pg_restore: [archiver] input file does not appear to be a valid archive
>
> Is this because I did not dump with the -F (format) option? Do I need to use
> "pg_dump -F t" for tar format?
>
> Any help will greatly improve my chances of enjoying the New Year
> celebration having completed this task a little sooner!
>
> Garo.
>
> on 10/27/02 2:13 PM, Bruno Wolff III at bruno(at)wolff(dot)to wrote:
>
>> On Sun, Oct 27, 2002 at 13:49:27 -0800,
>> Garo Hussenjian <garo(at)xapnet(dot)com> wrote:
>>> Hello,
>>>
>>> I have a dump file from "pg_dump dbname > dump_file" of about 115 Mb that
>>> takes a few seconds to create and takes several hours to restore using "psql
>>> dbname < dump_file".
>>>
>>> I can't imagine I'm doing this correctly! What am I missing?
>>
>> Enforcing constraints and updating indexes can take a lot of time.
>>
>> You might get a significant speed up by not creating indexes or enforcing
>> constraints (foreign keys probably being the bigest worry) until after
>> the data gets loaded.
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 2: you can get off all lists at once with the unregister command
>> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>>
>
> =-=-==-=-=-==
>
> Xapnet Internet Solutions
> 1501 Powell St., Suite N
> Emeryville, CA 94608
>
> Tel - (510) 655-9771
> Fax - (510) 655-9775
> Web - http://www.xapnet.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
=-=-==-=-=-==
Xapnet Internet Solutions
1501 Powell St., Suite N
Emeryville, CA 94608
Tel - (510) 655-9771
Fax - (510) 655-9775
Web - http://www.xapnet.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-12-31 06:49:36 | Re: Postgres run out of disk space |
Previous Message | Tom Lane | 2002-12-31 06:44:05 | Re: Dump / restore question |