Usage

To show help:


./bin/file-manager.sh -h

The following are available options:

  • -b,--backupDir <arg> Backup NiFi Directory (used with backup or restore operation)

  • -c,--nifiCurrentDir <arg> Current NiFi Installation Directory (used optionally with install or restore operation)

  • -d,--nifiInstallDir <arg> NiFi Installation Directory (used with install or restore operation)

  • -h,--help Print help info (optional)

  • -i,--installFile <arg> NiFi Install File (used with install operation)

  • -m,--moveRepositories Allow repositories to be moved to new/restored nifi directory from existing installation, if available (used optionally with install or restore operation)

  • -o,--operation <arg> File operation (install | backup | restore)

  • -r,--nifiRollbackDir <arg> NiFi Installation Directory (used with install or restore operation)

  • -t,--bootstrapConf <arg> Current NiFi Bootstrap Configuration File (used optionally)

  • -v,--verbose Verbose messaging (optional)

  • -x,--overwriteConfigs Overwrite existing configuration directory with upgrade changes (used optionally with install or restore operation)

Example usage on Linux:


# backup NiFi installation
# option -t may be provided to ensure backup of external boostrap.conf file
./file-manager.sh
-o backup
-b /tmp/nifi_bak
-c /usr/nifi_old
-v

# install NiFi using compressed tar file into /usr/nifi directory (should install as /usr/nifi/nifi-1.3.0).
# migrate existing configurations with location determined by external bootstrap.conf and move over repositories from nifi_old
# options -t and -c should both be provided if migration of configurations, state and repositories are required
./file-manager.sh
-o install
-i nifi-1.3.0.tar.gz
-d /usr/nifi
-c /usr/nifi/nifi_old
-t /usr/nifi/old_conf/bootstrap.conf
-v
-m

# restore NiFi installation from backup directory and move back repositories
# option -t may be provided to ensure bootstrap.conf is restored to the file path provided, otherwise it is placed in the
# default directory under the rollback path (e.g. /usr/nifi_old/conf)
./file-manager.sh
-o restore
-b /tmp/nifi_bak
-r /usr/nifi_old
-c /usr/nifi
-m
-v