I have to deploy odoo with postgres database on amazon cloud. That i can do by simply setting up EC2 server and setting uo odoo on it. In case if internet in down, I want to be able to access same services and already saved data offline as well. For that I plan to install odoo with postgres database on my local machine (in my office) as well. Now I can access odoo services from anywhere (using cloud) when there is internet available. But in case if internet is down, I must be able to use locally installed odoo to get same services. For that purpose I need two things
Both databases should be exact replicas of each other. On recovering from internet disconnectivity, I want the changes made in my local ( office) database reflect in the database at amazon cloud. I am new to this stuff, kindly suggest the best possible approach (architecture) in this scenario.