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

Error Restoring database

By
Shawn Varghese
on 10/16/15, 5:39 AM 2,120 views

I have used a script to backup my databases, and obtain a .sql.gz file as the backup file.

However, when I try to restore this file, I get the following error:

Exception: Postgres subprocess ('/usr/bin/pg_restore', '--username=odoo', u'--dbname=test1', '--no-owner', '/tmp/tmp2gZGZu') error 1

Could someone please help resolve this? All my backups are worthless as they throw the same error while restoring.



1
Kinner Vachhani
On 10/16/15, 8:23 AM

Hey Shawn, 


I am not sure how you are restoring the db. But I follow below steps

$createdb  test1 -T template1 -U odoo -h localhost

$zless test1.sql.gz | psql test1


Dumps:

$pg_dump --no-owner test1 | gzip > test1.sql.gz

Thanks a lot Kinner. This seems to be working. Does this mean that if we backup the DB with a script, then we cannot restore it using the UI? Is there any way to achieve this?

Shawn Varghese
on 10/16/15, 8:50 AM

Hi Shawn,

Odoo use zip to compress db while the command I sent you use gzip. Both uses different compression algorithm to compress and decompress file.

In order to use UI restore tool the db must be zip compressed or plain sql dump.

Hope this helps you.

Regards,
Kinner

<blockquote cite="mid:1444999839.406162977218628.220056323948286-openerp-92332-forum.post@accounts-a.odoo.com" type="cite">

Thanks a lot Kinner. This seems to be working. Does this mean that if we backup the DB with a script, then we cannot restore it using the UI? Is there any way to achieve this?

--
Shawn
Sent by Odoo S.A. using Odoo about Forum Post False
Kinner Vachhani
on 10/21/15, 5:44 AM

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

1 follower(s)

Stats

Asked: 10/16/15, 5:39 AM
Seen: 2120 times
Last updated: 10/16/15, 8:49 AM