In NiFi Toolkit, in the CLI, we currently have the following commands available:
We should have a command registry export-all-flows that does the following:
List all the buckets, for each bucket, list all flows, for each flow, list all versions and export each version. All files should be landing in a target directory provided as an argument of the function.
We also current have the following commands:
We should have a commend registry import-all-flows that does the following:
It takes a directory as input (the one created by the export-all-flows command), and goes through the files to create the corresponding buckets, flows and flows versions.
The original author, bucket id and flow id need to be kept.
- use case 1: NiFi 1 -> connecting to NiFi Registry 1, "re-initialising" an existing NiFi Registry, the NiFi Registry does not change, only its configuration.
- export everything
- change the NR flow definition repo backend from local FS to database (for example), or from git to database, etc
- import everything
the existing NiFi instance should not see any change
- use case 2: NiFi 1 -> Registry 1, NiFi 2 -> Registry 2, Disaster Recovery kind of thing between two different sites.
- export everything from NR1
- import everything into NR2
- If the import into NR2 is adding new versions, then NiFi 2 should be able to update an existing PG to a newer version of the flow.