zkCli.sh
and zk-shell
which are part of
the Apache Zookeeper distribution included as part of the Managed Fusion distribution.
The ZKImportExport service may be used to export ZooKeeper data for any Managed Fusion release.
It can be used to import configuration data into the ZooKeeper service for a new or existing Managed Fusion deployment.
For details on using this script to migrate Managed Fusion configurations from one deployment to another, see
Migrate Fusion Objects.
Migrate Fusion Objects
Migrate Fusion Objects
You can use the Fusion UI and the Objects API to migrate collections and related objects, including your searchable data, configuration data, pipelines, aggregations, and other objects on which your collections depend. You can also migrate entire apps.You might need to migrate objects in the following circumstances:
For more information about using the Objects API to export and import objects, see Objects API.The remainder of this topic describes approaches in the Fusion UI.Use the parts of the Fusion UI indicated in the table to export and import apps and specific objects. Exporting creates a zip file. To import, you select a data file and possibly a variable file.The approach with Object Explorer differs. With Object Explorer, you can add objects from other apps (or that are not linked to any apps) to the currently open app.
To upgrade from one Fusion version to a 5.x version, see Fusion 5 Upgrades to migrate objects.
- When migrating data from development environments into testing and production environments
- To back up data, so you can restore it after an incident of data loss
- When the migrator script was not able to migrate an object automatically
When you export and import objects to migrate them, make sure you that any data gets to where it is going before deleting the sources.
Migration approaches
Several approaches are available for migrating Fusion objects. This table summarizes the approaches.Export an app | Import an app | Export an object | Import an object | Add an object to an app | |
---|---|---|---|---|---|
Fusion UI | App configuration | Launcher (entire app) App configuration (combine apps) | - | - | Object Explorer |
Objects API (endpoints) | GET from export endpoint | POST to import endpoint | GET from export endpoint | POST to import endpoint | - |
Export an app with the Fusion UI
How to export an app with the Fusion UI- Navigate to the launcher.
- Hover over the app you want to export and click the Configure icon:
- In the app config window, click Export app to zip:
Import an app with the Fusion UI
How to import an app with the Fusion UI- Navigate to the launcher.
- Click Import app.
- Under Data File, click Choose File and select the zip file containing the app you want to import.
- If your app has usernames and passwords in a separate file, select it under Variables File.
If the Variables File is needed, it must be a separate file that is not in a .zip file. It is a .json map of variables to values. The following is an example:
- You can sometimes edit parameter values to use the new values in the imported app. If this is the case, Fusion displays a dialog box that lets you edit the parameter values.
Make desired changes, and then click Import.
Copy an app
To copy an app from one deployment to a different one, export the app on the source deployment, and then import the app on the target deployment.Import objects into an app
You can import objects into the currently open app.How to import objects into an open app- In the Fusion launcher, click the app into which you want to import objects. The Fusion workspace appears.
- Click System > Import Fusion Objects.
The Import Fusion Objects window opens.
- Select the data file from your local filesystem. If you are importing usernames and passwords in a separate file, select it under Variables File.
- Click Import.
If there are conflicts, Fusion prompts you to specify an import policy:
- Click Overwrite to overwrite the objects on the target system with the ones in the import file.
- Click Merge to skip all conflicting objects and import only the non-conflicting objects.
- Click Start Over to abort the import.
Fusion confirms that the import was successful:
- Click Close to close the Import Fusion Objects window.
Add an object to an app
You can add objects present in other apps (or in no apps) to the open app. Some objects are linked to other apps. You can also add those directly to an app.-
Add an object to an app – While in the Fusion workspace for the app to which you want to add an object, open Object Explorer and click In Any App. Search for or browse to the object you want to add. Hover over the object, click the App
icon, and then click Add to this app.
-
Add an object to an app directly – In cases when an object is linked to an app, but is not linked directly to the app (it is linked via some dependency), you can add the object to an app directly.
While in the Fusion workspace for the app to which you want to add an object directly, open Object Explorer and click In Any App. Search for or browse to the object you want to add. Hover over the object, click the App
icon, and then click Add to this app directly.
zkImportExport.sh
which can be used to import ZooKeeper configuration as well as to export it from arbitrary Managed Fusion instances.
See the official ZooKeeper documentation for details about using and managing a ZooKeeper service.
For more information, view the API specification.
Utility script zkImportExport.sh
This script is located in the top-level Managed Fusion scripts
directory.
The script takes the following command-line arguments:
- -c, —cmd : operation to perform.
- -z, —zkhost : the ZooKeeper Connect string.
Examples
Export all data from a local single-node ZooKeeper service, save data to a file:Fusion REST API service ZKImportExport
The Fusion REST API can only be used to download information from ZooKeeper, via the ‘GET’ method with the following configuration:/lucid/query-pipelines
/lucid/query-pipelines
. Do not expand the znodes
/lucid/query-pipelines
. encode in utf-8
/lucid/query-pipelines
. Exclude path /lucid/query-pipelines/default