I wonder if it is possible to sync only specific data from a local ERPNext server to a server that runs an online customer portal.
I do not want to put the local server on the internet for security reasons. However, I would like to have a client portal where documents and other messages may be exchanged with clients/customers.
It an be done in multiple ways. I can think of the following 2 -
If you want only a few doctypes to be replicated, you can use frappe client and use that to exchange data between the local and public servers. Check https://github.com/frappe/frappe-client
If you want to replicate the entire database, then you can write scripts to backup the local server db and restore it to the public server
the first solution is exactly what I wanted.
My Idea is to sync only those records that a user should have access to. I will probably add a custom field “is_in_portal” in the respective DocTypes and scan for this field with a frappe-client app.
A quick suggestion. Adding a field to all doctypes that need to be in portal will consume more space in db. Instead, add a new doctype that will have a child table of the doctypes that need to be ported. You can refer to this doctype from frappe client and export only those doctypes.
However, for a single DocType only some specific instances should be published on the portal to the customer. I need to decide internally for each case if the document is to be publish. I suppose this has to be done with the cusom field for every doctype.