Re: Restore backup file "with oids"

2019-12-18 Thread David G. Johnston
On Wednesday, December 18, 2019, Vladimir Koković <
vladimir.koko...@a-asoft.com> wrote:

> HI,
>
> The first thing I have to say is that I only have a plain backup file
> "with oids" from "PostgreSQL 8.4.2, 32-bit",
>
> from which I should take the contents of some tables.
> Any help from someone who was in a similar situation would help me a lot
> in resolving this situation
>
> Restore it into 9.4 and see if you can get what you need from there?

David J.


Re: Restore backup file "with oids"

2019-12-18 Thread Osahon Oduware
THE TRUTH CANNOT BE HIDDEN
**Explosion in my car.
https://www.docdroid.net/s11XHOS/the-truth-cannot-be-hidden.pdf

On Wed, 18 Dec 2019, 18:28 gmail Vladimir Koković, <
vladimir.koko...@gmail.com> wrote:

> Hi,
>
> Is there somewhere a script that can do a restore backup file "with oids"
> in some newer DB where there is no term "with oids"?
>
>
> Vladimir Koković, DP senior(69)
>
> Serbia, Belgrade, 18.December 2019
>
>
>


Re: Restore backup file "with oids"

2019-12-18 Thread Vladimir Koković

HI,

The first thing I have to say is that I only have a plain backup file 
"with oids" from "PostgreSQL 8.4.2, 32-bit",


from which I should take the contents of some tables.
Any help from someone who was in a similar situation would help me a lot 
in resolving this situation.


Thank you Heikki for your solution.


Vladimir Koković, DP senior(69)

Serbia, Belgrade, 18.December 2019


On 18.12.19. 19:34, Heikki Linnakangas wrote:

On 18 December 2019 19:28:07 EET, "gmail Vladimir Koković" 
 wrote:

Is there somewhere a script that can do a restore backup file "with
oids" in some newer DB where there is no term "with oids"?

There is nothing automatic, some manual work is needed. A couple of ideas:

1. Install an older version of PostgreSQL that still supports WITH OIDS, and 
restore the dump there. Use ALTER TABLE SET WITHOUT OIDS, and dump the database 
again (preferably with v12 of pg_dump).

2. Create the table manually, but with a regular oid-type column in place of 
the system column. Do a data-only restore.

You didn't mention what format the backup dump is. If it's in custom format, 
you can do a data-only restore easily. If it's a text sql file, and it's not 
too large, you can load it in a text exitor and edit manually.

- Heikki




Re: Restore backup file "with oids"

2019-12-18 Thread Heikki Linnakangas
On 18 December 2019 19:28:07 EET, "gmail Vladimir Koković" 
 wrote:
>Is there somewhere a script that can do a restore backup file "with 
>oids" in some newer DB where there is no term "with oids"?

There is nothing automatic, some manual work is needed. A couple of ideas:

1. Install an older version of PostgreSQL that still supports WITH OIDS, and 
restore the dump there. Use ALTER TABLE SET WITHOUT OIDS, and dump the database 
again (preferably with v12 of pg_dump).

2. Create the table manually, but with a regular oid-type column in place of 
the system column. Do a data-only restore. 

You didn't mention what format the backup dump is. If it's in custom format, 
you can do a data-only restore easily. If it's a text sql file, and it's not 
too large, you can load it in a text exitor and edit manually.

- Heikki




Re: Restore backup file "with oids"

2019-12-18 Thread Fabrízio de Royes Mello
On Wed, Dec 18, 2019 at 2:28 PM gmail Vladimir Koković <
vladimir.koko...@gmail.com> wrote:

> Hi,
>
> Is there somewhere a script that can do a restore backup file "with oids"
> in some newer DB where there is no term "with oids"?
>
>
>
Short answer: No!

Long answer: try use the pg_dump binary from your new version (12)
connecting to your old version... is the best practice when you want to
upgrade your PostgreSQL using dump/restore strategy.

Regards,

-- 
   Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


Restore backup file "with oids"

2019-12-18 Thread gmail Vladimir Koković

Hi,

Is there somewhere a script that can do a restore backup file "with 
oids" in some newer DB where there is no term "with oids"?



Vladimir Koković, DP senior(69)

Serbia, Belgrade, 18.December 2019