Difference between Staging and Production server

I am currently talking to a company which has three sister concerns. In the mother company they are using SAP B1.

In one of the sister concerns they want to implement ERPNext.

They asked me to setup two server instances:

  1. Production Server
  2. Staging Server

Currently they have such a setup in B1.

I don’t know what exactly this is but according to my understanding one is a Production server and another is a Developer server. Am I right here?

If what I understand is right then how can we move all the work of configuration, customization, etc. that we have done on Staging (Developer) server to Production Server?

Currently we setup ERPNext in developer mode and do all the work on it and then once everything is as per clients requirement we change the config to convert from Developer mode to Production mode.

But in this particular case we will have to maintain two different servers.

My question is:

Do we have to redo everything that we have done on Staging (Developer) server in Production server or is there an easy way for this?

I am asking this because this is going to be a continuous process. Every new feature that the company wants to implement will first have to be configured and customized on Staging (Developer) server and once it is finalized it will have to be moved to Production server.

Regards,

1 Like

This question is not specific to ERPNext but certainly could apply to it. In development ops, a staging server is typically used in an environment as close as possible to production to test release candidates.

1 Like

Peterg,

Thanks for the link it is quite informative but unrelated to my query.

Regards,

Hi Yogeshvachhani,

I was responding to this:

Staging servers and developer servers are not usually different.

As for the rest of your post, which deals with how to move customizations between different instances (regardless of server purpose), the answer depends on the nature of your changes. If your customizations are encapsulated in an app (as recommended), they’ll transfer automatically when you next run bench update. If they’re stored elsewhere (such as in the core source code or in client-side documents), you’ll have to take a more manual approach.

Do I take it that when if we make any configuration changes in Development server we will have to do them manually when moving to Production server?

But if we create any apps, they can be added/updated to Production server by running bench update.

Regards,

By “configuration changes”, I assume you mean changes made directly through the web interface (and thus stored in the instance database)? I wouldn’t imagine that this kind of “soft” customization would typically go through a full develop-staging-production cycle, but perhaps so if it’s particularly vulnerable data.

If that’s the kind of customization you’re talking about, there are a few options, depending on what you’ve changed. Everything in ERPNext is a doctype, including all transactions, all masters, and all configuration files. To move any/all of this data from one server to another, you can:

  1. Move it manually, possibly using the copy/paste feature, which is simplest if there’s not much to move
  2. Do a backup and parital-restore, importing only the doctypes that you’ve changed without touching live data.
  3. Export the doctypes you’ve configured as “fixtures” to your custom app, which will load them to production next time you use bench update.
  4. Set up sync with Frappe’s Event Streaming feature (this would work for some things better than others)