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

I am trying to upgrade Odoo 14 ee to Odoo 15 ee in docker.

When I execute the python https://upgrade.odoo.com/upgrade) test -d -t 15

where in I change the to my database name "xyz" for example.

I get postgres connection error.  Can I specify the postgresql host? The postgresql host is in another container. 

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

I downloaded the upgrade script

curl -s https://upgrade.odoo.com/upgrade > upgrade.py

modified the script

from 

def get_db_contract(dbname):
    try:
        output = subprocess.check_output(
            [
                "psql",
                dbname,

To

def get_db_contract(dbname):
    try:
        output = subprocess.check_output(
            [
                "psql",
                "-h",
                "",
                "-U",
                "",
                dbname,

   

do the same for pgdump and pg_restore and createdb lines/code


trusted all connections to postgresql by editing pg_hba.conf


installed openssh-client , and rsync


execute the script as

python3 < (cat upgrade.py) test -d <dbname> -t 15.0







Ảnh đại diện
Huỷ bỏ

Did you do all this from the command line of the docker container running Odoo, or from the command line of the docker host? I'm assuming the odoo container.

Tác giả

The script was edited outside the container, mounted the folder in docker.
Then execute the script in docker container

Tác giả

Also, you should restore database from old container (eg 14) to new container (eg 15)

Tác giả

I'm testing again the upgrade today. It seems there is no change needed in the script.
I'll update the answer later when done

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 23
4836
1
thg 7 20
3334
0
thg 4 25
924
2
thg 1 25
1998
2
thg 1 25
2518