Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Odoo 10 : backup and restore

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
filestorebackuprestorerestoredbodoo10
5 Răspunsuri
32558 Vizualizări
Imagine profil
Maxime MARAIS

Hi All,

Not a question, but a feedback after I encountered issues restoring an instance of Odoo on another machine.

BACKUP FROM SOURCE:

1. Dump your database

sudo -u postgres pg_dump -U postgres -E UTF-8 -F p -b -C -f <<your_backup_filename.sql>> <<your_odoo_database_name>>

Replace <<your_backup_filename.sql>> with a name of your choice and <<your_odoo_database_name>> with the name of your Odoo database. Ensure the postgres user has right permissions on the target directory (consider using /tmp/ for example)

This will produce a complete SQL dump of your Odoo database including statements to create the database itself when restoring.

2. Archive your files

$ tar -cf <<your_directory>>/odoo-filestore.tar /var/lib/odoo/.local/share/Odoo/filestore/<<your_odoo_database_name>>/
$ tar -cf <<your_directory>>/odoo-local-addons.tar /var/lib/odoo/.local/share/Odoo/addons
$ tar -cf <<your_directory>>/odoo-global-addons.tar /usr/lib/python2.7/dist-packages/odoo/addons

Make an archive of:

  • the file-store relative to your database (since Odoo 8, files are not stored in database but on the file system), replace <<your_odoo_database_name>> with the name of your Odoo database.

  • the addons downloaded from the UI (local to your Odoo instance),

  • the global addons available with all your Odoo instances.

RESTORE ON TARGET:

1. Stop Odoo

/etc/init.d/odoo stop

2. Expend file archives

Remove folder /var/lib/odoo/.local/share/Odoo/filestore/<<your_odoo_database_name>>/

Remove folder /var/lib/odoo/.local/share/Odoo/addons

Remove folder /usr/lib/python2.7/dist-packages/odoo/addons

$ tar xvf <<archive-name.tar>>

Expend all 3 archives and move directories on the target machine to their respective locations .

3. Restore database

$ sudo -u postgres psql
postgres=# DROP DATABASE <<your_odoo_database_name>>
postgres=# \i <<path_to/your_backup_filename.sql>>
postgres=# \q

Connect to your PostgreSQL server, drop the current database and import your database dump. This file will create the database and make it owned by user odoo.

4. Update your filestore

$ sudo -u odoo odoo -c /etc/odoo/odoo.conf -u all

Start Odoo from command line as user odoo and force update (-u all option), then browse to your Odoo server from http://<<your_odoo_url>>:<<your_odoo_port>>. Example : http://127.0.0.1:8069.

The first request will require a little moment to run: Odoo proceeds to an complete update.

When done, type CTRL+C to stop Odoo.

$ /etc/init.d/odoo start

Restart odoo as a daemon. Done. \o/


4
Imagine profil
Abandonează
Ermin Trevisan

Thanks for the write up. For the next time, it would be better to create it as a Q&A, like here: https://www.odoo.com/forum/help-1/question/ubuntu-16-04-how-to-install-sass-for-odoo-123090 .

Ermin Trevisan

What I'm looking for since a long time: how is it possible to restore a database without stopping Odoo?

Imagine profil
Maxime MARAIS
Autor Cel mai bun răspuns

@F. P.,

The SQL script generated by pg_dump restores the database ownership when recreating the database (-C option).

@Ermin Trevisan

Odoo keeps data in memory cache for performance considerations. Some data may not be saved yet on the source, some data in memory may differ from those in the database on the target. Trying to backup or restore Odoo database without stopping the application before may lead to data inconsistencies or data losses. Do always stop Odoo before doing maintenance operations on its database.

1
Imagine profil
Abandonează
Imagine profil
Fatih Piristine
Cel mai bun răspuns

 nice write up. one thing: when db owner changes, odoo will give you access errors. need to run change owner queries in db to get rid of them.

2
Imagine profil
Abandonează
Imagine profil
Hilar Andikkadavath
Cel mai bun răspuns

This addon do Automatic Backup DB and Filestore separate to the specified path.

Available Backup DB/Filestore Modes:

  • Local
  • Remote Server
  • Google Drive
  • Dropbox

Module For backup ODOO databases and automating the backup process of ODOO.

  • Multiple Backup Modes
  • Filestore Backup
  • Backup ODOO Databases in specified path
  • Detailed Message Log
  • Backup Status Information and History
  • User can select the format to dump, either custom archive, plain text SQL or tar archive
  • Archive Backup Process
  • Repeat Missed Backup Process

Features

  • Dump ODOO Database in specified format
  • Output a custom archive suitable for input into pg_restore. This is the most flexible format in that it allows the reordering of loading data as well as to object definitions. This format is also compressed by default. Here we user gzip ie, test.gz, We also recommend you to select Custom, because Using the custom format you can restore single objects from a backup.
  • Output a plain-text SQL script file (the default). The plain text format is useful for very small databases with a minimal number of objects but other than that, it should be avoided.
  • Output a tar archive suitable for input into pg_restore. Using this archive format allows reordering and/or exclusion of database objects at the time the database is restored. It is also possible to limit which data is reloaded at restore time. we use tar with gzip
  • Backup Filestore
  • Multiple backup modes at sametime

https://apps.odoo.com/apps/modules/13.0/auto_backup_odoo/

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Restore completes but database not visible Rezolvat
backup restore restoredb
Imagine profil
Imagine profil
Imagine profil
3
ian. 22
5943
Odoo Database error Rezolvat
postgresql backup restore odoo10
Imagine profil
1
dec. 21
11182
How to restore and backup db, all collaterals, and restore via script to fresh server? Rezolvat
filestore backup restore bash
Imagine profil
Imagine profil
Imagine profil
2
dec. 19
30394
Error in odoo 12 after restoring database, ProgrammingError: relation "ir_attachment_id_seq" does not exist Rezolvat
database backup restore restoredb odoo12
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
6
oct. 25
9902
How to make snapshots of the Odoo online configuration and restore them?
backup restore restoredb databasebackup snapshot
Imagine profil
0
apr. 24
3025
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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