Support Questions

Find answers, ask questions, and share your expertise

How to restore flows from git in NiFi Registry?

avatar
Explorer

I'm using GitFlowPersistenceProvider in NiFi Registry 0.3. Today I created another NiFi Registry and I wanted to load all flows from the previous one using the same provider. Unfortunately nothing happens - any buckets nor flows aren't recreated. I tried to create all buckets manually but even then any flows aren't imported.

GitFlowPersistenceProvider documentation states:

When NiFi Registry starts, this provider reads through Git commit histories and lookup these bucket.yml files to restore Buckets and Flows for each snapshot version.

What should I do to load existing flows into new NiFi Registry using GitFlowPersistenceProvider?

3 REPLIES 3

avatar
Explorer

HI @Maciej Michalec,

have you properly initialized the git / bucket folder?

NiFi Registry Documentation

Initialize Git directory

In order to use GitFlowPersistenceRepository, you need to prepare a Git directory on the local file system. You can do so by initializing a directory with git init command, or clone an existing Git project from a remote Git repository by git clone command.

avatar
Explorer

Hello, @Raymond Honderdors,

Yes, I had properly initialized git repository. Unfortunately answer from StackOverflow shows that restoring NiFi Registry without database object isn't possible, so documentation gives wrong information.

avatar
Contributor

@Maciej Michalec i found a related article https://issues.apache.org/jira/browse/NIFIREG-209 - Support rebuilding
metadata DB from Git repo.

with thanks to @Michal Klempa who created a working docker image "https://hub.docker.com/r/michalklempa/nifi-registry"

the Fix was released as part of version 0.4.0 (May 21, 2019)