Good morning. Our team has been discussing backup, versioning, and restore strategies to manage the backups we create of our NiFi flow.xml.gz files. I have a few questions about this.
Currently I manually execute a daily backup of my NiFi workflow from the Controller Settings UI, General tab, link Back-up flow. Each time I do this I get a new file in my archive subdirectory that appears to be prefixed with some sort of a UID. [UID]-flow.xml.gz. WE plan to version control these using GIT, in all likelihood. My questions are these: 1. I would like to automate the daily backup so that it is independent of the UI. I hope to run the backup from a cron job each night at midnight, along with many of our other periodic administrative jobs. What tools or APIs are available to me to automate this backup from a shell script in the Linux environment? 2. suppose we need to restore one of these backups that were created from flow.xml.gz on the same NiFi server instance. I have been told about the importance of gracefully shutting down NiFi before replacing the current flow.xml.gz with any one of these backup archived files. What about the state of the repositories? Will the state of the archived flow file - processors, queues, et al - still be available in our content, provenance, and flow repositories? Is the restore simply a matter of graceful shutdown, swap of the archived flow.xml.gz in for the current instance, and restart? 3. In a dev/int/prod environment that runs the same NiFi version and configuration on each NiFi server in each environment, do folks promote NiFi flow.xml.gz instances to production from dev and int? Are there "best practices" typically employed to do that in a DevOps environment? Thanks in advance for your insights and help. -Jim
