Created 07-22-2016 10:44 AM
I need to save my NiFi flow into an XML file.
We can import the xml file into template, but I also need to save NiFi flows as an XML file
Created on 07-22-2016 11:11 AM - edited 08-19-2019 01:00 AM
If you select a section of your flow, you can turn that into a template with the New Template button
You can then use the template manager:
This lists all your templates and allows you to download them as an XML file.
If you want to save the entire flow you have in the system, you can also find that in nifi/conf/flow.xml.gz on your nifi box. This is not a template, but would be able to drop into a clean NiFi instance.
Created on 07-22-2016 11:11 AM - edited 08-19-2019 01:00 AM
If you select a section of your flow, you can turn that into a template with the New Template button
You can then use the template manager:
This lists all your templates and allows you to download them as an XML file.
If you want to save the entire flow you have in the system, you can also find that in nifi/conf/flow.xml.gz on your nifi box. This is not a template, but would be able to drop into a clean NiFi instance.
Created 07-22-2016 12:26 PM
Simon is completely correct above; however, I want to add a little to his statement about saving the entire flow.xml.gz (Standalone or NiFI Cluster Node) file or flow.tar (NiFi Cluster NCM) file. When you generate templates in NiFi, those dataflows are scrubbed of all encrypted values (passwords). When importing those templates in to another NiFi, the user will need to repopulate all the processor and controller tasks passwords manually. Saving off the flow.xml.gz or flow.tar file will capture the entire flow exactly as it is, encrypted sensitive passwords and all. NiFi will not start if it cannot decrypt these encrypted sensitive properties contained in the flow.xml. When sensitive properties (passwords) are added they are encrypted using these settings from your nifi.properties file:
# security properties # nifi.sensitive.props.key= nifi.sensitive.props.algorithm=PBEWITHMD5AND256BITAES-CBC-OPENSSL nifi.sensitive.props.provider=BC
In order to drop your entire flow.xml.gz or flow.tar onto another clean NiFi, these values must all match exactly. Thanks,
Matt
Created 02-02-2018 01:12 PM
Hi @Matt Clarke, I tried coping flow.xml.gz and nifi.properties security setting but after that NiFi is crashing with below error, any suggestions?
ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.lang.IllegalArgumentException: Unable to access properties loader in the expected manner - apparent classpath or build issue
java.lang.IllegalArgumentException: Unable to access properties loader in the expected manner - apparent classpath or build issue.
Created 02-02-2018 01:23 PM
Hi @Matt Clarke, I tried coping flow.xml.gz and nifi.properties security setting but after that NiFi is crashing with below error, any suggestions?
ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.lang.IllegalArgumentException: Unable to access properties loader in the expected manner - apparent classpath or build issue
java.lang.IllegalArgumentException: Unable to access properties loader in the expected manner - apparent classpath or build issue
Created 11-15-2016 07:53 PM
Looking at our current environment, seems like there are 2 instances of flow.xml.gz file. One under nifi-node and another under nifi-cluster-manager. Which file do we need to copy over ? Both?
Created 11-15-2016 07:56 PM
In a healthy cluster they should both be the same.
Created 11-15-2016 08:06 PM
Ok. The question is if we rehydrate to a new cluster should we copy over the flow files to both locations?
Created 11-15-2016 07:53 PM
Looking at our current environment, seems like there are 2 instances of flow.xml.gz file. One under nifi-node and another under nifi-cluster-manager. Which file do we need to copy over ? Both?
Created 11-15-2016 07:54 PM
Looking at our current environment, seems like there are 2 instances of flow.xml.gz file. One under nifi-node and another under nifi-cluster-manager. Which file do we need to copy over ? Both?