Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Odoo 18: Cannot import DB dump from cloud installation into a fresh on-prem installation

Subscriure's

Get notified when there's activity on this post

This question has been flagged
importdatabasemigration
1 Respondre
840 Vistes
Avatar
Stefan Guenther

Hello,

as  postgres user I have executed to following commands to import the cloud database dump to migrate the Odoo installation to one of our servers:

dropdb odoo

createdb -O odoo odoo

psql odoo < /dump_lang.sql


But the import crashes with a number of errors:

....

ERROR:  null value in column "short_time_format" of relation "res_lang" violates not-null constraint

DETAIL:  Failing row contains (1, English (US), en_US, en, en, t, ltr, %m/%d/%Y, %H:%M:%S, null, 7, [3,0], ., ,, 1, 2022-06-29 17:39:34.171452, 1, 2023-03-24 00:13:17.176204).

CONTEXT:  COPY res_lang, line 1: "1 English (US) en_US en en t ltr %m/%d/%Y %H:%M:%S 7 [3,0] . , 1 2022-06-29 17:39:34.171452 1 2023-0..."

......

ERROR:  relation "public.base_registry_signaling" does not exist

LINE 1: SELECT pg_catalog.setval('public.base_registry_signaling', 6...

......

ERROR:  insert or update on table "website" violates foreign key constraint "website_default_lang_id_fkey"

DETAIL:  Key (default_lang_id)=(1) is not present in table "res_lang".

ERROR:  insert or update on table "website_lang_rel" violates foreign key constraint "website_lang_rel_lang_id_fkey"

DETAIL:  Key (lang_id)=(1) is not present in table "res_lang".

...

ERROR:  insert or update on table "website_visitor" violates foreign key constraint "website_visitor_lang_id_fkey"

DETAIL:  Key (lang_id)=(1) is not present in table "res_lang".

.....


My expectation was, that the dump contains all required information to migrate the installation. Obviously that is not the case.

Does anyone have an idea how to solve errors mentioned above?


Thanks for any help or suggestions,

Stefan



0
Avatar
Descartar
Christoph Farnleitner

Does "cloud database dump" mean Odoo Online or odoo.sh? In any case, can't you download a full backup from https://yourdomain.com/web/databse/manager and upload at the new server the same way?

Stefan Guenther
Autor

"Cloud database dump" means, that I can only download the database from the web interface on odoo.com. There is no access to the database manager web interface like on a on-prem installation. And there is no way to set any option prior to the download.

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,


Since you’re working with Odoo 18, the problem comes from trying to restore an SQL dump that doesn’t fully match the Odoo 18 schema.


* Columns like short_time_format or tables like base_registry_signaling only exist in Odoo 18 (they were added/changed compared to older versions).

* If your dump was taken in plain SQL (pg_dump … > dump.sql), it might not include all schema details in the right order. That causes missing foreign keys and constraint violations during import.


Fix:-

1- Both source and target must be Odoo 18 (same edition: Community or Enterprise, same patch).


2- Use custom-format dump (not plain SQL):


On source server:


pg_dump -U odoo -h source_host -Fc source_db > full_dump.dump


This includes schema + data in the correct order.



3-Prepare empty database on target


    Start your new Odoo 18 instance once so it creates its base schema.


    Drop and recreate the DB:


    dropdb -U odoo odoo

    createdb -U odoo -O odoo odoo


4- Restore with pg_restore


pg_restore -U odoo -d odoo full_dump.dump


5- Update Odoo modules after restore


Run:


odoo -u all -d odoo


This makes sure any missing fields, constraints, or new schema changes are applied.




Hope it helps

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
database migration Solved
database migration
Avatar
Avatar
1
de març 23
3077
What is the Best Way to Migrate Data in a Custom Module? Solved
import migration
Avatar
Avatar
1
de gen. 20
7228
Database import and odoo start
import database
Avatar
Avatar
2
d’ag. 18
11161
Migration of the database
database migration
Avatar
Avatar
1
d’abr. 17
4302
Getting error after trying to import database
database migration
Avatar
Avatar
1
de gen. 25
6890
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now