Restore DUMP, PostgreSQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Restore DUMP, PostgreSQL

Post by FCS » Wed 02 Oct 2013 18:41

Hello,

How to restore a dump created by the UniDump component from PostgreSQL database?

Regards
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Restore DUMP, PostgreSQL

Post by AlexP » Thu 03 Oct 2013 11:15

Hello,

A BackUp created in UniDump is a file containing DML commands, therefore you can restore data by executing these scripts in any SQL editor.

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Restore DUMP, PostgreSQL

Post by FCS » Thu 03 Oct 2013 11:48

Hello,

I have tried do this.
1. There is a problem on the constrains.
2. Is it correct that a dump contains data from database views?
3. My dump file contains blob data too. This way its size is about 100MB. The PgAdmin's SQL editor has problems with so big files. Do you know a good tool to read and execute commands from so big files?

Regards
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Restore DUMP, PostgreSQL

Post by AlexP » Thu 03 Oct 2013 14:02

Hello,

1) Before restoring data from the dump, you should disable all constraints and triggers, since tables are dumped alphabetically;
2) Bug with dump data from view was fixed in version 4.5.10;
3) You can try running the commands from your file by the standard console utility - psql.

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Restore DUMP, PostgreSQL

Post by FCS » Thu 03 Oct 2013 16:16

Hello,

Ad.1
How to do it in proper way?

Ad.2
I use UniDac 4.6.12. Data from the views exist in the dump file.

Ad.3
Thanks.

Regards
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Restore DUMP, PostgreSQL

Post by AlexP » Fri 04 Oct 2013 10:35

Hello,

1) If constraints are created with the DEFERRABLE option, you can disable them within a transaction in the following way:

Code: Select all

Start transaction;
ALTER TABLE test drop CONSTRAINT pk_test;
ALTER TABLE test  ADD CONSTRAINT pk_test PRIMARY KEY(id)  DEFERRABLE;
SET CONSTRAINTS  ALL DEFERRED;
--data insert
COMMIT;
2) We have fixed the behaviour, now in UniDAC, as well as in PgDAC, data returned from view is not included to backup

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Restore DUMP, PostgreSQL

Post by FCS » Fri 04 Oct 2013 11:19

Hello,

Could you check from which version of UniDac the Dump file doesn't contain data from views ?

Thanks
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Restore DUMP, PostgreSQL

Post by AlexP » Mon 07 Oct 2013 10:43

Hello,

This fix will be included in the new version

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Restore DUMP, PostgreSQL

Post by FCS » Mon 07 Oct 2013 12:01

Hello,

When do you plan to release the new version ?
I understand that this version will be next to 5.1.4?

Regards
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Restore DUMP, PostgreSQL

Post by AlexP » Mon 07 Oct 2013 12:42

Hello,

This feature will be added to the next UniDAC 5.1.5 release

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Restore DUMP, PostgreSQL

Post by FCS » Mon 07 Oct 2013 13:34

Hello,

When do you release the new version ?

Regards
Michal

AndreyZ

Re: Restore DUMP, PostgreSQL

Post by AndreyZ » Tue 08 Oct 2013 08:38

We plan to release all DAC products next month.

Post Reply