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.

  1. 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>
    
  2. 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.x is /var/lib/nifiregistry/flow_storage.

Git flow storage (GitFlowPersistenceProvider)

This provider stores flow contents under a Git directory.

  1. 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>
    
  2. In the git repository directory, run git remote -v to show the URL of the remote.
  3. Clone the git repository in the destination environment.
  4. 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 that FileSystemFlowPersistenceProvider 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:
        xml.providers.flowPersistenceProvider.git-provider.enabled
        
        Value: true
      • Name:
        xml.providers.flowPersistenceProvider.git-provider.class
        
        Value: org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider
      • Name:
        xml.providers.flowPersistenceProvider.git-provider.property.Flow Storage
                        Directory
        
        Value: ./your_repo
      • Name:
        xml.providers.flowPersistenceProvider.git-provider.property.Remote To
                        Push
        
        Value: origin
      • Name:
        xml.providers.flowPersistenceProvider.git-provider.property.Remote Access
                        User
        
        Value: git_user
      • Name:
        xml.providers.flowPersistenceProvider.git-provider.property.Remote Access
                Password
        Value: git_password
  5. Save the changes.

Database table storage (DatabaseFlowPersistenceProvider)

This provider leverages the same database used for the metadata database.

  1. 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>
    
  2. Configure the destination registry. In Cloudera Manager:
    • Uncheck Providers: Enable File Flow Persistence Provider (xml.providers.flowPersistenceProvider.file-provider.enabled) so that FileSystemFlowPersistenceProvider 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:
        xml.providers.flowPersistenceProvider.database-provider.enabled
        
        Value: true
      • Name:
        xml.providers.flowPersistenceProvider.database-provider.class
        Value: org.apache.nifi.registry.provider.flow.DatabaseFlowPersistenceProvider
  3. Save the changes.

After you finish

When you having completed the flow storage migration, you may proceed by migrating your bundle storage configurations