Migrating Datasets, Visuals, and Apps

During normal operations, it may become necessary to create back-ups of visuals, or to migrate them from one environment to another. Currently, this is supported through the command line interface.

ArcViz creates several artifacts, including visuals and apps. These objects store the configurations that define the visuals and apps: the layout, the associated dataset, and the query. They do not store the actual raw data, or results. The configurations are stored within the Arcadia Data metastore as MySql, SQLite, or Oracle definitions.

The following steps demonstrate how to migrate an app or a visual, for Cloudera installations, and for Other installations.

Before starting the migration, identify the objects you want to migrate or replicate:

Migrating Datasets, Visuals, and Apps in Cloudera Installations

  1. Open an ssh interface to the server that runs ArcViz.

    ssh -i ~/.ssh/cdhldaptest.pem ec2-user@ec2-52-33-206-246.us-west-2.compute.amazonaws.com
  2. Change to the parcels/tools directory.

    cd /opt/cloudera/parcels/ARCADIAENTERPRISE/lib/arcviz/
  3. Change account to Arcadia user.

    sudo su arcadia
  4. Run the utility scripts.

    • Export a Single App. For either a visual or an app, run the app export utility script to make a copy of the artifact configuration from the ArcViz instance and save it to a temporary directory. Note that in the following example, app=66 and app_66 uniquely identifies the exported artifact, while ds_1 identifies its dataset.

      ./arcviz util app export --app=66 --file=/tmp/tv_app_66_ds_1_export
    • Import a Single App. For either a visual or an app, run the app import utility script to import the artifact configuration from a temporary directory to a new ArcViz instance. Note that in the following example, app_187 uniquely identifies the artifact, while ds_11 identifies its dataset.

      ./arcviz util app import --file=/tmp/tv_app_817_ds_11_export --dataset=11:1
    • Export a Dataset. Run the dataset utility script with the export option, -e, to copy the dataset configuration from the ArcViz instance, and save it to a temporary directory. Note that in the following example, 1 and ds_1 are used to uniquely identify the dataset by its id.

      ./arcviz util dataset -e /tmp/ds_1_export 1
    • Import a Dataset. Run the dataset utility script with the import option, -i, to import a saved copy of the dataset configuration from a temporary directory into a new ArcViz instance. Note that in the following example, ds_1 is used to uniquely identify the dataset by its id.

      ./arcviz util dataset -i /tmp/ds_1_export --dcmap=1:3

Migrating Datasets, Visuals, and Apps in Other Installations

  1. Open an ssh interface to the server that runs ArcViz.

  2. Change to the parcels/tools directory.

    cd /opt/arcadia/tools/arcviz/
  3. Change account to Arcadia user.

    sudo su arcadia
  4. Export the Django settings module.

    export DJANGO_SETTINGS_MODULE=arcweb.settings_local
  5. Run the utility scripts.

    • Export a Single App. For either a visual or an app, run the appexport.pyc utility script to make a copy of the artifact configuration from the ArcViz instance and save it to a temporary directory. Note that in the following example, app=215 and app_215 uniquely identifies the exported artifact, while ds_16 identifies its dataset.

      python util/appexport.pyc--app=215 --file=/home/arc/airbnb_app_215_ds_16
    • Import a Single App. For either a visual or an app, run the appimport.pyc utility script to import the artifact configuration from a temporary directory to a new ArcViz instance. Note that in the following example, app_215 uniquely identifies the artifact, while ds_16 identifies its dataset.

      python util/appimport.pyc --file=/home/arc/airbnb_app_215_ds_16 --dataset=16:133
    • Export a Dataset. Run the ds-util.pyc utility script with the export option, -e, to copy the dataset configuration from the ArcViz instance, and save it to a temporary directory. Note that in the following example, 16 and ds_16 are used to uniquely identify the dataset by its id.

      python util/ds_util.pyc -e /home/arc/airbnb_ds_16_export 1
    • Import a Dataset. Run the ds_util.pyc utility script with the import option, -i, to import a saved copy of the dataset configuration from a temporary directory into a new ArcViz instance. Note that in the following example, ds_16 is used to uniquely identify the dataset by its id.

      python util/ds_util.pyc -i /home/arc/airbnb_ds_16_export --dcmap=3:15