Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

How to restore a dump.sql file to new postgresql database ?

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
restoredatabasebackupPostgresql9.4
10 Réponses
80811 Vues
Avatar
Sathwik

Hi I am having a backup of database of odoo as dump.sql.

When I am trying to restore it back to a  new database in postgresql, I am unable to restore it shows "psql:D:/dump/dump.sql:117019: ERROR: invalid input syntax for integer: " /. "CONTEXT: COPY account_account, line 79, column id: " /. "

I am using command as \i file_path/dump.sql

 when I am trying to execute a

Copy tale_name (fields....) from stdin;

1 . . . .data

it shows error 

How can I execute this and how can I restore dump.sql without error ?



0
Avatar
Ignorer
Mahmou Sekawe

what is the OS you'r using and the OS the database was backup from?

Sathwik
Auteur

I am using Windows OS, and the OS database was backup from was ubuntu

Is there any security issues with difference in OS @Mahmou Sekawe

Avatar
imed
Meilleure réponse

you can try this process:

First copy your dump.sql into desired server or desktop if you re in localhost

Next create manually a database with createdb dbname;

And after that import your dump.sql definition in your database created via psql dbname <  yourpath/dump.sql

next affect your database to owner odoo

ALTERDATABASE OdooDb OWNER TO odoo

Afterwards give the role odoo in database the SUPER USER rights with

 ALTER USER user_name with SUPER USER;

Finally 

copy the files under filestore generated with database in your filestore database for example under Centos 7 you 'll find it in /var/lib/fielstore/dbname

And after that you can open your db on odoo

Note your addons modules must be synchronized with your actual database 

  



2
Avatar
Ignorer
Saloua.sahnoune

Thanks a lot man :D

Momanyi Abraham

Dope

Avatar
Malik Sikandar Hayat
Meilleure réponse

Hi,

In odoo 10 while clicking on Backup and then entering master password getting following error,


Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpxi53It/dump.sql', u'database_db01') error 1

what could be the reason as my hosting is on AWS. thanks

2
Avatar
Ignorer
Avatar
Nikhil Krishnan
Meilleure réponse

Hi Sathwik,

look this:

 https://medium.com/@nikhilkrishnan/how-to-restore-your-psql-database-for-odoo-fc7b0bdcfe28

Thanks

2
Avatar
Ignorer
Avatar
Didier Hernandez M
Meilleure réponse

​If your had dowloaded the database from Odoo online can execute this command from the terminal line, just change the bold parameters with your owns:

curl -F 'master_pwd=your_db_pwd' -F backup_file=@/path_to_the_directory/file_to_import.zip -F 'copy=true' -F 'name=db_name' http://your_IP_Address:8069/web/database/restore

0
Avatar
Ignorer
Avatar
Hetashree Chauhan (hch)
Meilleure réponse

You can restore the database using terminal by following below listed commands.

createdb dbname

go to source file where you locate dump file

pg_restore -c -d db_name filename.dump(for dump file)

0
Avatar
Ignorer
Avatar
NareshKumar.P
Meilleure réponse

you can try through front end 

http://localhost/web/database/manager#action=database_manager or Manage database option and select restore then give master pwd and database name and user name and pwd. The database will restore

0
Avatar
Ignorer
Avatar
Sathwik
Auteur Meilleure réponse

It is not allowing to restore from the front end. I tried it but it didn't worked.

so trying it from postgresql DB level, when I am trying to execute the dump file query it is showing errors as mentioned above.

I am trying it from psql console using command \i file_name.sql.  It gives syntax error as 

"psql:C:/Users/sevate/Desktop/trainingdb_2017-01-07_09-39-27/dump2.sql:117019: ERROR: invalid input syntax for integer: "/. " CONTEXT: COPY account_account, line 79, column id: " /. "

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Problem- Restore Database on Odoo 8
restore restoredb databasebackup
Avatar
Avatar
Avatar
3
juin 16
8336
restore database from terminal
database restore restoredb databasebackup
Avatar
1
mai 16
9310
Issue Restoring a Database in Odoo 17 CE : Database already exists
community restore databasebackup zipfile OdooV17
Avatar
Avatar
Avatar
2
avr. 25
2217
The following modules are needed by other modules but have not been defined,
restore
Avatar
1
févr. 25
88
Accident how to restore remove from view
restore
Avatar
Avatar
1
nov. 24
2369
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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