Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
10353 Lượt xem

When restoring a database backup made in the database manager host/web/database/restore as a copy into a Virtual Machine I receive the following error message in the GUI:
Database restore error: Postgres subprocess ('/usr/bin/pg_restore', '--dbname=LATEST', '--no-owner', '/tmp/tmpj83mkk2a') error 1

And a yellow ATTENTION icon next to restored database manager with tooltip "This database may not be compatible".

Odoo log reports:
Database restore error: Postgres subprocess ('/usr/bin/pg_restore', '--dbname=LATEST', '--no-owner', '/tmp/tmpj83mkk2a') error 1


POSTGRES10 log reports:
2021-05-21 02:12:35.780 UTC [1818] odoo@LATEST FATAL: database "LATEST" does not exist

The Virtual Machine is an image of the actual server and I have double checked the OS (Ubuntu 18.04.1 LTS) and POSTGRES version (10.15) 

Seems like a common error in the forum but I have not find a solution for the issue.
¿Any ideas?



Ảnh đại diện
Huỷ bỏ
Tác giả

This setup was working with no issues until a couple days ago.

There was no software or OS update in the machines.

Tác giả Câu trả lời hay nhất

Installing postgres and pg_dump v10.15 in my virtual machine fixed the issue.

A reference if someone else gets the same error in the future.
This post gave me a lead:
https://www.odoo.com/es_ES/forum/ayuda-1/database-backup-error-postgres-subprocess-usr-bin-pg-dump-no-owner-file-tmp-tmptgmgln-dump-sql-u-databasename-error-1-162670
In my case I was trying to restore a backup generated in a postgres10.15 with pg_dump10.15 into a virtual machine with postgres10.16 pg_dump10.16.
I am sure the different versions are not the reason, postgres follows semantic versioning so as long as you keep in v10.x nothing will break, but installing v10.15 in the virtual machine worked for me.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

When I try to restore database backup to another server (digital ocean to test server on aws), showing an error like this, I tried to change odoo base to same as of the live server.

Traceback (most recent call last): File "/odoo14/odoo14-server/odoo/api.py", line 792, in get field_cache = field_cache[record.env.cache_key(field)] KeyError: (None,)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/odoo14/odoo14-server/odoo/fields.py", line 972, in get value = env.cache.get(record,\ self) \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 796,\ in\ get \ \ \ \ raise\ CacheMiss(record,\ field) odoo.exceptions.CacheMiss:\ 'res.users(20,).image_128'

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Traceback\ (most\ recent\ call\ last): \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 792,\ in\ get \ \ \ \ field_cache\ =\ field_cache[record.env.cache_key(field)] KeyError:\ (None,)

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Traceback\ (most\ recent\ call\ last): \ \ File\ "/odoo14/odoo14-server/odoo/fields.py",\ line\ 972,\ in\ get \ \ \ \ value\ =\ env.cache.get(record,\ self) \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 796,\ in\ get \ \ \ \ raise\ CacheMiss(record,\ field) odoo.exceptions.CacheMiss:\ 'res.partner(12809,).image_128'

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Traceback\ (most\ recent\ call\ last): \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 792,\ in\ get \ \ \ \ field_cache\ =\ field_cache[record.env.cache_key(field)] KeyError:\ (None,\ None)

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Traceback\ (most\ recent\ call\ last): \ \ File\ "/odoo14/odoo14-server/odoo/fields.py",\ line\ 972,\ in\ get \ \ \ \ value\ =\ env.cache.get(record,\ self) \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 796,\ in\ get \ \ \ \ raise\ CacheMiss(record,\ field) odoo.exceptions.CacheMiss:\ 'ir.attachment(321,).datas'

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Traceback\ (most\ recent\ call\ last): \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 792,\ in\ get \ \ \ \ field_cache\ =\ field_cache[record.env.cache_key(field)] KeyError:\ (None,)

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Traceback\ (most\ recent\ call\ last): \ \ File\ "/odoo14/odoo14-server/odoo/fields.py",\ line\ 972,\ in\ get \ \ \ \ value\ =\ env.cache.get(record,\ self) \ \ File\ "/odoo14/odoo14-server/odoo/api.py",\ line\ 796,\ in\ get \ \ \ \ raise\ CacheMiss(record,\ field) odoo.exceptions.CacheMiss: 'ir.attachment(321,).raw'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/odoo14/odoo14-server/odoo/addons/base/models/ir_attachment.py", line 105, in _file_read with open(full_path, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: '/odoo14/.local/share/Odoo/filestore/APL_2.0/c5/c54d3d5e2b1320083bf5378b7c195b0985fa04c1'


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,


Check dbuser Parameter in your ODOO.CONF File.


Thanks & Regards,

Sunny Sheth

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Sunny, thank you for replying.

There is no dbuser parameter neither in the origin machine nor in the VM.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 21
3587
1
thg 1 20
5552
3
thg 8 19
7108
6
thg 4 16
12440
1
thg 3 24
1297