コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

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

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

Odoo 10 : backup and restore

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
filestorebackuprestorerestoredbodoo10
5 返信
32542 ビュー
アバター
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
アバター
破棄
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?

アバター
Maxime MARAIS
著作者 最善の回答

@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
アバター
破棄
アバター
Fatih Piristine
最善の回答

 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
アバター
破棄
アバター
Hilar Andikkadavath
最善の回答

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
アバター
破棄
ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
Restore completes but database not visible 解決済
backup restore restoredb
アバター
アバター
アバター
3
1月 22
5928
Odoo Database error 解決済
postgresql backup restore odoo10
アバター
1
12月 21
11172
How to restore and backup db, all collaterals, and restore via script to fresh server? 解決済
filestore backup restore bash
アバター
アバター
アバター
2
12月 19
30389
Error in odoo 12 after restoring database, ProgrammingError: relation "ir_attachment_id_seq" does not exist 解決済
database backup restore restoredb odoo12
アバター
アバター
アバター
アバター
アバター
6
10月 25
9888
How to make snapshots of the Odoo online configuration and restore them?
backup restore restoredb databasebackup snapshot
アバター
0
4月 24
3018
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة 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(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

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