Migrate flow storage
Provides steps for migrating your local file system, git, or database table flow storage.
Local file system flow storage (FileSystemFlowPersistenceProvider)
This provider is the default Flow Persistence Provider.
- Confirm the configuration of the flow storage directory specified in the source registry
providers.xml:
<flowPersistenceProvider> <class>org.apache.nifi.registry.provider.flow.FileSystemFlowPersistenceProvider</class> <property name="Flow Storage Directory">./flow_storage</property> </flowPersistenceProvider>
- Copy the flow storage directory from the source registry installation to the location
specified by the Providers: Default Flow Persistence File Provider Property -
Flow Storage Directory
(
xml.providers.flowPersistenceProvider.file-provider.property.Flow Storage Directory
) configuration property in the destination registry. The default directory path in CFM 2.0.1 is /var/lib/nifiregistry/flow_storage.
Git flow storage (GitFlowPersistenceProvider)
This provider stores flow contents under a Git directory.
- Confirm the configuration of the flow storage directory specified in the source registry
providers.xml:
<flowPersistenceProvider> <class>org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider</class> <property name="Flow Storage Directory">./your_repo</property> <property name="Remote To Push">origin</property> <property name="Remote Access User">git_user</property> <property name="Remote Access Password">git_password</property> </flowPersistenceProvider>
- In the git repository directory, run
git remote -v
to show the URL of the remote. - Clone the git repository in the destination environment.
- Configure the destination registry to point at the git repo. In Cloudera
Manager:
-
Uncheck Providers: Enable File Flow Persistence Provider (
xml.providers.flowPersistenceProvider.file-provider.enabled
) so thatFileSystemFlowPersistenceProvider
is no longer enabled -
Find the NiFi Registry configuration property NiFi Registry Advanced Configuration Snippet (Safety Valve) for staging/providers.xml. Add the following snippets:
-
Name:
Value:xml.providers.flowPersistenceProvider.git-provider.enabled
true
-
Name:
Value:xml.providers.flowPersistenceProvider.git-provider.class
org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider
-
Name:
Value:xml.providers.flowPersistenceProvider.git-provider.property.Flow Storage Directory
./your_repo
-
Name:
Value:xml.providers.flowPersistenceProvider.git-provider.property.Remote To Push
origin
-
Name:
Value:xml.providers.flowPersistenceProvider.git-provider.property.Remote Access User
git_user
-
Name:
Value:xml.providers.flowPersistenceProvider.git-provider.property.Remote Access Password
git_password
-
-
- Save the changes.
Database table storage (DatabaseFlowPersistenceProvider)
This provider leverages the same database used for the metadata database.
- Confirm the configuration of the flow storage directory specified in the source registry
providers.xml:
<flowPersistenceProvider> <class>org.apache.nifi.registry.provider.flow.DatabaseFlowPersistenceProvider</class> </flowPersistenceProvider>
- Configure the destination registry. In Cloudera Manager:
-
Uncheck Providers: Enable File Flow Persistence Provider (
xml.providers.flowPersistenceProvider.file-provider.enabled
) so thatFileSystemFlowPersistenceProvider
is no longer enabled -
Find the NiFi Registry configuration property NiFi Registry Advanced Configuration Snippet (Safety Valve) for staging/providers.xml. Add the following snippets:
-
Name:
Value:xml.providers.flowPersistenceProvider.database-provider.enabled
true
-
Name:
Value:xml.providers.flowPersistenceProvider.database-provider.class
org.apache.nifi.registry.provider.flow.DatabaseFlowPersistenceProvider
-
-
- Save the changes.
After you finish
When you having completed the flow storage migration, you may proceed by migrating your bundle storage configurations