跳至内容
菜单
此问题已终结
2 回复
105 查看

Hello there,

​How can I keep the custom modules & studio customization as same in the staging db then data only from the production db to be restored?


​Any suggestion/clarification/document link/anything related to this from your end will help a lot.


Thanks!


形象
丢弃
最佳答案

Hi,


To keep custom modules and Studio customizations in staging while restoring only production data, you should restore the production database without overwriting custom modules. This means you either:


    Restore only the data (not the filestore or custom modules) from production into staging.


    Or restore the full production DB, then re-install/merge your staging custom modules and Studio customizations back.


The key idea is to separate code/customizations (kept in staging) from data (copied from production).


Hope it helps

形象
丢弃
最佳答案

This is a common need when working with Odoo.sh because restoring production to staging will, by default, overwrite both code and database (including studio customizations).

Export Studio Customizations as Module

  • Go to Odoo Studio → Customizations → Export as Module.
  • Add that module to your Odoo.sh repo (install it on all environments).
  • This way, Studio changes live in Git → safe across restores.

Update Staging DB with Production Data

  • From Odoo.sh dashboard → Staging branch → "Restore" → Select Production backup.
  • This replaces staging DB with production DB (data + configs).
  • Code remains as per staging branch.
  • Install/upgrade your Studio module to apply those changes again.

So, in short:

  • Custom modules are safe (they live in Git).
  • Studio customizations must be exported as a module if you don’t want them wiped out when restoring production DB.

形象
丢弃
相关帖文 回复 查看 活动
2
3月 24
1878
3
1月 22
5131
3
6月 16
7518
1
3月 15
5819
2
1月 25
1215