This question has been flagged
2 Replies
11774 Views

In windows postgresql 8.4 and openerp 7 Database TAR File Size: 4.40GB System Installed Memory: 4.00GB

1) PostgreSQL Backup taken in the Format Compress it shows error:-

pg_dump: dumping contents of table ir_attachment pg_dump: Dumping the contents of table "ir_attachment" failed: PQgetCopyData() failed. pg_dump: Error message from server: lost synchronization with server: got message type "d", length 2156530 pg_dump: The command was: COPY public.ir_attachment (id, create_uid, create_date, write_date, write_uid, description, datas_fname, url, res_model, company_id, res_name, type, res_id, file_size, db_datas, store_fname, name, file_type, partner_id, user_id, parent_id, index_content) TO stdout; pg_dump: * aborted because of error

After that Backup taken in the TAR Format

1) PostgreSQL Backup taken in the Format Tar (successfully taken)

2) Tried to restore the Format Tar Backup File its shows error:-

pg_restore: [tar archiver] corrupt tar header found in 66\\254\\223?\\233:\\264D|\\270\\352*9\\255\\265\\266`#\\272\\210.\\356\\245{P\\006\\345\\025I\\322 (expected 34, computed 35343) file position 427438080
pg_restore: *** aborted because of error`enter code here`

I tried in command prompt also its show same error

Please give me suggestion how to solve this issue

Avatar
Discard
Best Answer

Hi,

You should use pgAdmin to backup/restore your DB. That works fine. I do use it usually.

Google for pgAdmin.org

Just my 2 cents

Regards

Avatar
Discard
Best Answer

Can you show me your command pgdumpt and pg_restore

Avatar
Discard
Author

pg_dump -v -o -U username -ci -Ft -f "D:\Desktop\filename.tar" db_name

pg_restore -c -i -U username -d db_name -v "D:\Desktop\filename.tar" -W [The above command used for dump and restore]

You must using parameter-F t. pg_restore -F t -U user -d db filename

Author

ok i trying the same above cmd

Author

Facing the same error before ir_attachment all the record data are restored. Ir_attachment table and after all the table record data are not stored.

Author

Is there any way to skip only ir_attachment table only? and all other table data restore and finally restore ir_attachment Thanks

Author

2013-06-24 07:29:56 EDT ERROR: missing data for column "store_fname" 2013-06-24 07:29:56 EDT CONTEXT: COPY ir_attachment, line 490: "601 26 2012-07-13 09:29:57.467 \N \N \N Ruth Scott_PICC Exchange_.." 2013-06-24 07:29:56 EDT STATEMENT: COPY ir_attachment (id, create_uid, create_date, write_date, write_uid, description, datas_fname, url, res_model, company_id, res_name, type, res_id, file_size, db_datas, store_fname, name, file_type, partner_id, user_id, parent_id, index_content) FROM stdin; 2013-06-24 07:29:56 EDT LOG: could not send data to client: No connection could be made

Author

because the target machine actively refused it. In the Postgresql Log file the above error shows.

To ignore a table you can use the -T ir_attachment option, and then with -t ir_attachment to only bakcup that table. But I do not see why this will help you

You can drop table attachment then restore again