Version restore under nodered

Hi,

In our project, we have different nodered instances under different environments (dev, prod, etc).
I'm wondering what's the best way to restore / publish flows from one nodered to another.
(let's suppose here that we don't have access to flow files of the nodered server, and we can only use nodered Admin apis)

For instance, once we validate the flows under the dev environment, we want to publish and override the whole things under the nodered in prod environment.

Two questions for me are:

  1. should we get all flows/subflows/configs from the first nodered server, delete all under the destination nodered server, and finally re-post everything ?
  2. is there a way to manually prepare credential files ?

thanks a lot