Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Odoo db from sh #471

Open
ranoaritsiky opened this issue Oct 11, 2023 · 2 comments
Open

Restore Odoo db from sh #471

ranoaritsiky opened this issue Oct 11, 2023 · 2 comments

Comments

@ranoaritsiky
Copy link

ranoaritsiky commented Oct 11, 2023

I've dockerized Odoo 16 using enterprise version
version: '3.1'
services:
web:
image: odoo:16.0
user: root
depends_on:
- db
ports:
- "8987:8069"
- "20016:8072" # live chat
tty: true
command: --
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo
volumes:
#- /etc/timezone:/etc/timezone:ro
#- /etc/localtime:/etc/localtime:ro
# - ./entrypoint.sh:/entrypoint.sh # if you want to install additional Python packages, uncomment this line!
- ./addons:/mnt/extra-addons
- ./enterprise/odoo/addons:/mnt/enterprise-addons
- ./etc:/etc/odoo
restart: always
db:
image: postgres:14
user: root
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
- POSTGRES_DB=postgres
restart: always # run as a service
volumes:
- ./postgresql:/var/lib/postgresql/data
The point is that when i want to restore a database from odoo sh, it was restored but when i login in ,
it show me Error 500 and this is in the log

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1998, in call
response = request._serve_db()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1725, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 156, in _dispatch
result.flatten()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1099, in flatten
self.response.append(self.render())
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1091, in render
return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2125, in _render_template
return self.env['ir.qweb']._render(template, values)
File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 580, in _render
result = ''.join(rendering)
File "<191>", line 329, in template_191
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
ValueError: L'élément '' ne peut être localisé dans la vue parente
Template: web.webclient_bootstrap
Path: /t/t/t[1]/t[4]
Node:

@ranoaritsiky ranoaritsiky changed the title Backup Odoo db from sh Restore Odoo db from sh Oct 11, 2023
@Khant-NyarxG-Next
Copy link

in my case,i make restore with this

curl -F 'master_pwd=ohmypassword' -F backup_file=@./path/of/backup.zip -F 'copy=true' -F 'name=db_name' http://localhost:8069/web/database/restore

@lathama
Copy link

lathama commented Apr 2, 2024

@ranoaritsiky does the above help you here? Do you need this issue any longer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants