Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2656 มุมมอง

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. 

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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







อวตาร
ละทิ้ง

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.

ผู้เขียน

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

ผู้เขียน

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

ผู้เขียน

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 23
5103
1
ก.ค. 20
3561
0
เม.ย. 25
1196
Upgrade 17 to 18 on prem แก้ไขแล้ว
2
ม.ค. 25
2476
Upgrade Odoo v16 to v17 on windows แก้ไขแล้ว
2
ม.ค. 25
2921