Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
importdatabasemigration
1 Responder
828 Vistas
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
Mejor respuesta

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
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
database migration Resuelto
database migration
Avatar
Avatar
1
mar 23
3063
What is the Best Way to Migrate Data in a Custom Module? Resuelto
import migration
Avatar
Avatar
1
ene 20
7214
Database import and odoo start
import database
Avatar
Avatar
2
ago 18
11153
Migration of the database
database migration
Avatar
Avatar
1
abr 17
4291
Getting error after trying to import database
database migration
Avatar
Avatar
1
ene 25
6884
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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