Syncing specific data of a local server with server that runs online customer portal

Hi there,

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.

Would such thing be possible with ERPNext/Frappe?

Best regards

1 Like

It an be done in multiple ways. I can think of the following 2 -

  1. 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 GitHub - frappe/frappe-client: Python library to use Frappe API

  2. 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

1 Like

Thanks kirthi,

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.

Best regards!

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.

Thanks for the suggestion.

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.