docker
docker copied to clipboard
Restore Odoo db from sh
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 '
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
@ranoaritsiky does the above help you here? Do you need this issue any longer?