This question has been flagged
16 Replies
32017 Views

Dear all,

I need to syncronize two openerp physically distanced databases. One database is on local install, and the second database must on a cloud environment.

Since I lack of good internet access, I cannot have the system working full time on cloud, and the solution is to allow access to the database via cloud (A) and local install (B). When I am on the company, I use the local install (A), and when outside the company, I use the cloud Odoo system (B).

With syncronization, I want to have all data entered on the cloud A available on the local install B and vice-versa.

The syncronitation should be time defined and/or on demand.

Any help?

Thank you very much

Regards

Paulo

Avatar
Discard

I believe only supported way to have replicated databases is to use web services to keep both of them at same state/level; more about webservices you may find here: https://doc.odoo.com/6.1/developer/12_api/ but be aware please that so called 'web services' are more a tool than a solution; if you would need to have solution for having both databases with same data with minimum delays/lags, you would have to - probably - hire developer to make solution (two consistent databases) from tool (web services). By the way, I would be interested in similar solution as well, considering there are more people wanted to have replicas, maybe would be good to let odoo developers know that there is such a need in community?.. :) regards Tomasz

@Paulo, SerpentCS has ported the base_synchro module to version 8.0: https://github.com/JayVora-SerpentCS/SerpentCS_Contributions-v8 I think this module is specifically designed to handle multi-master Odoo instances to allow you to have different Odoo instances synced with each other. I have not yet tried it myself, however I will be setting something like what you have described soon (POS, Website, and Main Server - three separate instances synced), so I will post back here with what I discover. In the meantime if you have any questions regarding the module i'd recommend contacting Serpent Consulting through their github profile.

Best Answer

Kindly see https://github.com/JayVora-SerpentCS/SerpentCS_Contributions-v8/tree/master/base_synchro !

Avatar
Discard
Best Answer

For Asynchronous replication, you can setup bucardo  and run in your local server. The remote or cloud server is not required for any installation but you must have postgres 9.x above for both location, you can setup master-master replication or master-slave replication. Once installed just cron the sync on demand by starting and stopping the service.  Bucardo 5.1.1 works for me hope it can help you too.

Avatar
Discard
Author

jc, are you using bucardo? great news and I really believe it can solve my problem. I have tried to use it but had lots of problem during installation process. Will try it again.

As far as I know odoo is not supporting any database-level manipulation/replication? I believe bucardo may be used for database level replication, question is if it is recommended way considering odoo point of wiev: https://doc.odoo.com/6.1/developer/12_api/ regards Tomasz

Best Answer

Forget asynchronous replication. Suppose you have two databases asynchronous replicated, each accessed by one diferent user. In a time when the two dates are not connected, the two users insert a new record in the same object in each of the two databases (in sale.order for example). I have the same ID for sale.order? (Primary key IDs are serial long in odoo). Also reference field will have the same SO ...? Raise this situation a conflict at next replication ? I think yes...

Avatar
Discard
Best Answer

Hi Paulo
For your problem, i think you can get a good result if you define a cron job which synchronise data on the two databases periodically.

A link for definition of cron job : http://www.thesitewizard.com/general/set-cron-job.shtml

Best regards
NB: If my answer help you, don't forget to vote my message. Thank you.

Avatar
Discard
Author

Hi Chancerel, thank you. I have a look on you link. Unfortunetly I have not enough karma to vote heheh. If I have any problem I will post it here.

Best Answer

Lets say if your internet connection goes off at your Local Office. The people who are using at your office will prepare some quotes in local erp and you might be travelling and might make quotations on cloud database,

How does above mentioned solutions help? Does it take care of conflicts too?

Avatar
Discard
Best Answer

Please check this:

http://www.rubyrep.org/

U can find everthing what is important.

Avatar
Discard
Author

klacus, thank you. Just one question, does rubyrep works with tables with no primary key? Have you use it with Odoo? Thank you.

Hi Paolo!

Unfortunately not. i do not have any experience about it.
Sorry.
B.R.
Laci
2014-09-05 10:41 keltezéssel, paulo.matos@thinkopensolutions.co.ao írta:
<blockquote cite="mid:1409906484.694796085357666.313446659029486-openerp-60362-forum.post@accounts.odoo.com" type="cite">

klacus, thank you. Just one question, does rubyrep works with tables with no primary key? Have you use it with Odoo? Thank you.

--
Paulo Matos‏
Sent by OpenERP S.A. using Odoo about Forum Post False
Best Answer

Read this.

It'll help you with setting up a multi master or master slave replication for Odoo

Avatar
Discard
Best Answer

One easy practical solution is to backup your database in cloud drive, like dropbox. So syncronization process is handle by the cloud drive. What you have to focus is the backup/restore database script which can be triggered by cron/scheduled job.

Avatar
Discard
Author

It was a solution but the problem is not backup/restore problem. The ideia is syncronization. I will have some users using the database on both sides. Backing up and restore will make loose data from one of the sides.