Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

backup and restore failed in openerp 7

By
Prakash
on 6/17/13, 12:07 PM 4,460 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

0
DNTQ
On 6/24/13, 7:26 AM

Can you show me your command pgdumpt and pg_restore

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]

Prakash
on 6/24/13, 8:12 AM

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

DNTQ
on 6/24/13, 8:43 AM

ok i trying the same above cmd

Prakash
on 6/24/13, 8:59 AM

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.

Prakash
on 6/24/13, 9:20 AM

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

Prakash
on 6/24/13, 9:24 AM

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

Prakash
on 6/24/13, 9:38 AM

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

Prakash
on 6/24/13, 9:40 AM

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

Lucio
on 6/24/13, 3:47 PM

You can drop table attachment then restore again

DNTQ
on 6/24/13, 9:52 PM
0
Thierry Godin
On 6/24/13, 3:23 PM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 6/17/13, 12:07 PM
Seen: 4460 times
Last updated: 3/16/15, 8:10 AM