DEV Community

Timothy Spann.   🇺🇦
Timothy Spann. 🇺🇦

Posted on • Originally published at datainmotion.dev on

3 3

Backup and Restore NiFi Registry Templates

Backup and Restore NiFi Registry Templates

Example Backed Up NiFi Flow Excerpt

{

"bucket" : {

"createdTimestamp" : 1566430253392,

"identifier" : "aaa50be8-b994-46b5-a0bb-be245c34b928",

"link" : {

"href" : "buckets/aaa50be8-b994-46b5-a0bb-be245c34b928",

"params" : {

"rel" : "self"

}

},

"name" : "IoT",

"permissions" : {

"canDelete" : true,

"canRead" : true,

"canWrite" : true

}

},

"flow" : {

"bucketIdentifier" : "aaa50be8-b994-46b5-a0bb-be245c34b928",

"bucketName" : "IoT",

"createdTimestamp" : 1566430269976,

"description" : "Created by MiNiFi C2 Flow Designer",

"identifier" : "56902ff0-62ac-4189-9684-765247c885b5",

"link" : {

"href" : "buckets/aaa50be8-b994-46b5-a0bb-be245c34b928/flows/56902ff0-62ac-4189-9684-765247c885b5",

"params" : {

"rel" : "self"

}

},

"modifiedTimestamp" : 1567693783102,

"name" : "raspianjava",

"type" : "Flow",

"versionCount" : 10

Restoring Backed Up NiFi Flows

http://nifi.apache.org/docs/nifi-registry-docs/rest-api/index.html

To restore an Apache NiFi registry flow file.

Create a flow

POST

/buckets/{bucketId}/flows

Creates a flow

Using bucket id, upload a flow via POST and get a new flow id

Create a version of a flow

POST with that bucket id and flow id

/buckets/{bucketId}/flows/{flowId}/versions

Creates the next version of a flow

Scripted NiFi Registry Backups for DevOps Processing

You can also backup and restore NiFi Registry using the NiFi Python API or REST API directly.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay