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.

1

Could Not Restore Database Error. Odoo V8

By
JA
on 2/12/15, 10:16 AM 3,878 views

It starts to run, gets to about 80% and then the message on the center off screen: Could Not Restore Database. But at the same time on a message box at right top corner says database resored.

Can not figure it out.

 

Thanks in advance for your time and help.

 

0

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
996
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 4/14/16, 2:18 AM

Dear JA,

Please use below code.

Modified the openerp/tools/misc.py as follows:

def exec_pg_command(name, *args):
    prog = find_pg_tool(name)
    env = exec_pg_environ()
    with open(os.devnull) as dn:
# default commit 4bd2ee1
# https://github.com/odoo/odoo/commit/4bd2ee1aaace8e7f6fa5621688e00dc2115fa8a7
#        args2 = (prog,) + args
#        rc = subprocess.call(args2, env=env, stdout=dn, stderr=subprocess.STDOUT)
#        if rc:
#            raise Exception('Postgres subprocess %s error %s' % (args2, rc))
#
#
# new modification maclarensg
# https://github.com/odoo/odoo/issues/5241#issuecomment-76509036
         rc = subprocess.call((prog,) + args, env=env, stdout=dn, stderr=subprocess.STDOUT)
# new modification end

Hope this help for you.

Cheers,

Ankit H Gandhi.

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 2/12/15, 10:19 AM

Check your logs for Odoo to see what the reason would be. Then post them here and we can have a look on how to solve this.

@Ludo,

I'm having the same issue after a recent pull that @JA has described. I've opened a github issue here:

https://github.com/odoo/odoo/issues/5241

along with steps to reproduce and an excerpt from the debug logs. The traceback is as follows:

2015-02-12 09:18:10,054 7521 DEBUG testing openerp.tools.translate: translation went wrong for "'Backup Database'", skipped 2015-02-12 09:22:16,089 7521 INFO None openerp.service.db: DUMP DB: testing format zip 2015-02-12 09:22:16,208 7521 ERROR testing openerp.addons.web.controllers.main: Database.backup Traceback (most recent call last): File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 736, in backup dump_stream = openerp.service.db.dump_db(backup_db, None, backup_format) File "/opt/odoo/odoo-server/openerp/service/db.py", line 196, in dump_db openerp.tools.exec_pg_command(*cmd) File "/opt/odoo/odoo-server/openerp/tools/misc.py", line 127, in exec_pg_command raise Exception('Postgres subprocess %s error %s' % (args2, rc)) NameError: global name 'args2' is not defined 2015-02-12 09:22:16,209 7521 DEBUG testing openerp.tools.translate: translation went wrong for "'Backup Database'", skipped

I think the issue may have been introduced in a recent commit, although I am not sure which one. I have referenced a commit with a reference to the name 'args2' that was done recently, however i'm not absolutely sure whether this commit is related to the issue or not.

Luke Branch
on 2/12/15, 10:55 PM

@Ludo,

Thanks for your help. I've just updated the github issue mentioned above. It looks like xmo-odoo issued a fix for the initial issue here:

https://github.com/odoo/odoo/commit/ec9a543014a91be17398ba6e443578fe37c3a885

However i've run into another issue in the same process detailed here:

https://github.com/odoo/odoo/issues/5241#issuecomment-76509036

I'm trying to determine if it has something to do with my setup/environment, or if it's a problem with an update in one of the core Odoo SA modules.

This setup was working fine up until a couple of weeks ago, so I suspect it may be related to Odoo core code updates, however if not I need to revise my setup procedure.

Your insight on this would be invaluable.

Luke Branch
on 2/27/15, 11:26 PM
0
JA
On 2/12/15, 2:18 PM

Thanks. It seems in my case is because a configuration on nginx, and the error is about file to big. The case is that the file is only 4.3mb.

I will find correct configuration and see if this resolves issue.

@JA,

Please write back here with what you find. I seem to have run into exactly the same issue without an Nginx proxy.

Luke Branch
on 2/16/15, 10:58 PM

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

2 follower(s)

Stats

Asked: 2/12/15, 10:16 AM
Seen: 3878 times
Last updated: 4/14/16, 2:18 AM