NiFi Toolkit (NiFi CLI) 설치 밎 Parameter context 백업/복원 방법
NiFi 를 사용하면 전역 변수처럼 parameter contexts를 유용하게 사용하는데, 이 parameter contexts를 백업/복원 하는 경우가 필요할 수 있다.
아래와 같은 경우 유용하게 사용할 수 있다.
- 내 parameter contexts를 다른 컴퓨터에 parameter contexts로 복사하고 싶을 경우
- parameter contexts를 백업해 두고 싶은 경우
Parameter contexts를 백업/복원 하려면 NiFi Web에서 할 수 있지 않기 때문에 별도의 Toolkit을 설치해야 한다.
Apache NiFi Toolkit (NiFi CLI) 를 이용한다.
https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html
Apache NiFi Toolkit Guide
In order to facilitate the secure setup of NiFi, you can use the tls-toolkit command line utility to automatically generate the required keystores, truststore, and relevant configuration files. This is especially useful for securing multiple NiFi nodes, wh
nifi.apache.org
NiFi ToolKit (NiFi CLI) 설치방법
1. 아래 사이트에서 NiFi Toolkit Binary를 다운로드한다.
https://nifi.apache.org/download.html
Apache NiFi Downloads
Copyright © 2023 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, NiFi, Apache NiFi and the project logo are trademarks of The Apache Software Foundation.
nifi.apache.org

2. [Windows기준] 압축을 푹고 cli.bat 파일이 있는 폴더 내부에서 `우클릭 -> 터미널에서 열기` 혹은 터미널에서 `cd`명령어로 디렉토리 이동 (리눅스는 .sh파일이다.) 후 해당 명령어 입력
./cli.bat
### ▽정상적으로 실행된 결과▽ ###
Detected java 11 or later runtime version: 11
_ ___ _
Apache (_) .' ..](_) ,
_ .--. __ _| |_ __ )\
[ `.-. | [ |'-| |-'[ | / \
| | | | | | | | | | ' '
[___||__][___][___] [___]', ,'
`'
CLI v1.20.0
Type 'help' to see a list of available commands, use tab to auto-complete.
Session loaded from C:\Users\user\.nifi-cli.config
Parameter contexts ID 확인 방법
1. NiFi Web 에 접속 후 Parameter Contexts 클릭

2. 백업 대상의 Parameter Context 수정 버튼 클릭 후 Settings 클릭하면 아래와 같이 ID를 알 수 있다.

Parameter context 백업 방법
cli 프로그램에 접속했다고 가정한다.
nifi export-param-context -u <백업대상의 NIFI ADDRESS>:<PORT> -pcid <Parameter Context ID> -o <백업할 디렉토리/파일명.json>
Parameter context 복원 방법
nifi import-param-context -u <복원대상의 NIFI ADDRESS>:<PORT> -i <백업했었던 디렉토리/파일명.json> -pcn <새로 지정할 ParameterContext명>
복원 구문 실행 시 새로 지정한 ParameterContext에 대한 pcid 값이 출력된다.
확장자는 항상 JSON 이다.
'NiFi' 카테고리의 다른 글
[Python - Selenium]NiFi ExecuteStreamCommand로 웹크롤링 하기 (0) | 2023.06.24 |
---|---|
NiFi Custom Processor 만들기 (0) | 2023.05.31 |
Remote Process Group 사용법 (0) | 2023.05.24 |
NiFi TimeZone변경 (0) | 2023.05.23 |
[Docker] NiFi설치하기 (0) | 2023.05.23 |
NiFi Toolkit (NiFi CLI) 설치 밎 Parameter context 백업/복원 방법
NiFi 를 사용하면 전역 변수처럼 parameter contexts를 유용하게 사용하는데, 이 parameter contexts를 백업/복원 하는 경우가 필요할 수 있다.
아래와 같은 경우 유용하게 사용할 수 있다.
- 내 parameter contexts를 다른 컴퓨터에 parameter contexts로 복사하고 싶을 경우
- parameter contexts를 백업해 두고 싶은 경우
Parameter contexts를 백업/복원 하려면 NiFi Web에서 할 수 있지 않기 때문에 별도의 Toolkit을 설치해야 한다.
Apache NiFi Toolkit (NiFi CLI) 를 이용한다.
https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html
Apache NiFi Toolkit Guide
In order to facilitate the secure setup of NiFi, you can use the tls-toolkit command line utility to automatically generate the required keystores, truststore, and relevant configuration files. This is especially useful for securing multiple NiFi nodes, wh
nifi.apache.org
NiFi ToolKit (NiFi CLI) 설치방법
1. 아래 사이트에서 NiFi Toolkit Binary를 다운로드한다.
https://nifi.apache.org/download.html
Apache NiFi Downloads
Copyright © 2023 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, NiFi, Apache NiFi and the project logo are trademarks of The Apache Software Foundation.
nifi.apache.org

2. [Windows기준] 압축을 푹고 cli.bat 파일이 있는 폴더 내부에서 `우클릭 -> 터미널에서 열기` 혹은 터미널에서 `cd`명령어로 디렉토리 이동 (리눅스는 .sh파일이다.) 후 해당 명령어 입력
./cli.bat
### ▽정상적으로 실행된 결과▽ ###
Detected java 11 or later runtime version: 11
_ ___ _
Apache (_) .' ..](_) ,
_ .--. __ _| |_ __ )\
[ `.-. | [ |'-| |-'[ | / \
| | | | | | | | | | ' '
[___||__][___][___] [___]', ,'
`'
CLI v1.20.0
Type 'help' to see a list of available commands, use tab to auto-complete.
Session loaded from C:\Users\user\.nifi-cli.config
Parameter contexts ID 확인 방법
1. NiFi Web 에 접속 후 Parameter Contexts 클릭

2. 백업 대상의 Parameter Context 수정 버튼 클릭 후 Settings 클릭하면 아래와 같이 ID를 알 수 있다.

Parameter context 백업 방법
cli 프로그램에 접속했다고 가정한다.
nifi export-param-context -u <백업대상의 NIFI ADDRESS>:<PORT> -pcid <Parameter Context ID> -o <백업할 디렉토리/파일명.json>
Parameter context 복원 방법
nifi import-param-context -u <복원대상의 NIFI ADDRESS>:<PORT> -i <백업했었던 디렉토리/파일명.json> -pcn <새로 지정할 ParameterContext명>
복원 구문 실행 시 새로 지정한 ParameterContext에 대한 pcid 값이 출력된다.
확장자는 항상 JSON 이다.
'NiFi' 카테고리의 다른 글
[Python - Selenium]NiFi ExecuteStreamCommand로 웹크롤링 하기 (0) | 2023.06.24 |
---|---|
NiFi Custom Processor 만들기 (0) | 2023.05.31 |
Remote Process Group 사용법 (0) | 2023.05.24 |
NiFi TimeZone변경 (0) | 2023.05.23 |
[Docker] NiFi설치하기 (0) | 2023.05.23 |