473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem restoring Database

I have just upgraded froom Fedora test1 to test2 which has upgraded
postgres version from 7.4.2 to 7.4.5 (frrom rpm -q)

I have used pg_dumpall to dump my database, the restore appeared to go
OK, except there is no data in two of my tables (only these two)

output from \d \d tb_invoice_header
Table
"public.tb_invoice_header"
Column | Type
| Modifiers
--------------------+-----------------------+-----------------------------------------------------------------------
inv_id | integer | not null default
nextval('public.tb_invoice_header_inv_id_seq'::tex t)
client_id | integer |
payable_recievable | character varying(15) |
amount | money |
amount_paid | money |
date_paid | date |
cheque | character varying(20) |
Indexes:
"ih_pk" primary key, btree (inv_id)

\d tb_invoice_detail
Table "public.tb_invoice_detail"
Column | Type |
Modifiers
-------------+------------------------+-------------------------------------------------------------------
id | integer | not null default
nextval('public.tb_invoice_detail_id_seq'::text)
invoice_id | integer |
code | character varying(15) |
description | character varying(100) |
amount | money |
vat_code | smallint |
line_total | money |
Indexes:
"tb_id_pk" primary key, btree (id)
Foreign-key constraints:
"$1" FOREIGN KEY (invoice_id) REFERENCES tb_invoice_header(inv_id)

The dump file contains all the data

Anyone have any idea what is happening, and more important how to rescue

thanks

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
3 2678
On Thursday 01 April 2004 16:56, mike wrote:
I have just upgraded froom Fedora test1 to test2 which has upgraded
postgres version from 7.4.2 to 7.4.5 (frrom rpm -q)
Clever, since 7.4.5 hasn't been released yet. If that's actually what it says,
consider getting in touch with the packager, it should probably be 7.4.2-5.
Oh, between minor versions (e.g. 7.4.1 => 7.4.99) you don't need to
dump/restore, you can leave the files in-place. It's only when you go from
7.4 to 7.5 you need to dump/restore.
I have used pg_dumpall to dump my database, the restore appeared to go
OK, except there is no data in two of my tables (only these two)


You don't have to restore into a database, you can just redirect stdout to a
file:

pg_restore --table=tb_invoice_header mydumpfile > dump-invoice-headers.txt

You can manually import this using psql then. I'm a little puzzled as to how
this can happen without any error messages though - might you have missed
one?

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2
mike wrote:
I have just upgraded froom Fedora test1 to test2 which has upgraded
postgres version from 7.4.2 to 7.4.5 (frrom rpm -q)
Uhh unless I am missing something what you have done is impossible.
There is no 7.4.5....

Are you sure it didn't upgrade from 7.3.2 to 7.3.5? Or WORSE:

7.3.2 to 7.4.2?

If you have your dump still, you should be in fine shape. What flags
did you pass to pg_dumpall?

Sincerely,

Joshua D. Drake

I have used pg_dumpall to dump my database, the restore appeared to go
OK, except there is no data in two of my tables (only these two)

output from \d \d tb_invoice_header
Table
"public.tb_invoice_header"
Column | Type
| Modifiers
--------------------+-----------------------+-----------------------------------------------------------------------
inv_id | integer | not null default
nextval('public.tb_invoice_header_inv_id_seq'::tex t)
client_id | integer |
payable_recievable | character varying(15) |
amount | money |
amount_paid | money |
date_paid | date |
cheque | character varying(20) |
Indexes:
"ih_pk" primary key, btree (inv_id)

\d tb_invoice_detail
Table "public.tb_invoice_detail"
Column | Type |
Modifiers
-------------+------------------------+-------------------------------------------------------------------
id | integer | not null default
nextval('public.tb_invoice_detail_id_seq'::text)
invoice_id | integer |
code | character varying(15) |
description | character varying(100) |
amount | money |
vat_code | smallint |
line_total | money |
Indexes:
"tb_id_pk" primary key, btree (id)
Foreign-key constraints:
"$1" FOREIGN KEY (invoice_id) REFERENCES tb_invoice_header(inv_id)

The dump file contains all the data

Anyone have any idea what is happening, and more important how to rescue

thanks

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #3
On Thu, 2004-04-01 at 20:08, Joshua D. Drake wrote:
mike wrote:
I have just upgraded froom Fedora test1 to test2 which has upgraded
postgres version from 7.4.2 to 7.4.5 (frrom rpm -q)


Uhh unless I am missing something what you have done is impossible.
There is no 7.4.5....

Are you sure it didn't upgrade from 7.3.2 to 7.3.5? Or WORSE:

7.3.2 to 7.4.2?

If you have your dump still, you should be in fine shape. What flags
did you pass to pg_dumpall?

Sincerely,

Joshua D. Drake


even more curious is that I have just done a new dump/restore using
pg_dump (ie: not dumpall) and eveything worked fine

I have used pg_dumpall to dump my database, the restore appeared to go
OK, except there is no data in two of my tables (only these two)

output from \d \d tb_invoice_header
Table
"public.tb_invoice_header"
Column | Type
| Modifiers
--------------------+-----------------------+-----------------------------------------------------------------------
inv_id | integer | not null default
nextval('public.tb_invoice_header_inv_id_seq'::tex t)
client_id | integer |
payable_recievable | character varying(15) |
amount | money |
amount_paid | money |
date_paid | date |
cheque | character varying(20) |
Indexes:
"ih_pk" primary key, btree (inv_id)

\d tb_invoice_detail
Table "public.tb_invoice_detail"
Column | Type |
Modifiers
-------------+------------------------+-------------------------------------------------------------------
id | integer | not null default
nextval('public.tb_invoice_detail_id_seq'::text)
invoice_id | integer |
code | character varying(15) |
description | character varying(100) |
amount | money |
vat_code | smallint |
line_total | money |
Indexes:
"tb_id_pk" primary key, btree (id)
Foreign-key constraints:
"$1" FOREIGN KEY (invoice_id) REFERENCES tb_invoice_header(inv_id)

The dump file contains all the data

Anyone have any idea what is happening, and more important how to rescue

thanks

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Yair Sageev | last post by:
Greetings. I was running PHP Nuke on a Win2k box using Apache2Triad. Fortunately I backed up the drive using windows backup prior to the hard drive failure. Now I have installed Apache2Triad...
6
by: Edwinah63 | last post by:
Hi Gurus, i am having problems with restoring a ms sql database. i have restored the database using veritas to a different location ('g:\datafiles') in no recover mode. when i view the...
2
by: Raffi | last post by:
I use the --all-databases switch to backup my entire database. Sometimes there's a need to restore individual databases or tables form the backup file. What command should I use for this? ...
0
by: bkow | last post by:
I am having this problem Server Config System : Sun E250 ( 2 hard disks - One is a mirror) 1 GB ram OS : Solaris 7 Db2 : version 7.2 Running software raid for mirroring. The production and...
9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
8
by: Ondine | last post by:
Hi I have a client running an Access 2000 database on a small network with 3 pc's. Two of the laptop pcs have a data replica, which they use when not connected to the network, the 'server'...
2
by: Fischer Ulrich | last post by:
Hi I have a problem with the restoring of a database which uses tsearch2. I made a backup as discribed in 'tsearch-v2-intro' on the tsearch2 page. Now i'm trying to restore it into a...
1
by: Robbert van Geldrop | last post by:
Hello, I have a problem restoring Exchange 2000 files. Our software has an interface to ESEBCLI2.dll for online backup and restore features. Everything works fine with Exchange 2003 and also...
0
by: DMT012 | last post by:
Hello. Occasionally on my production server when I run an automated script to restore a database from a backup it hangs and the database is put in restoring mode and just stays there, requiring me...
1
by: babu | last post by:
Hi all I am trying to take exchange server 2003 backup and restore programmatically. My backup function works fine. But i am in problem in restoring database. My HrESERestoreAddDatabase is not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.