Working with the ZipSync mode sample files

The epic-client-5.5.124.zip file includes three ZipSync mode archives (located in the samples folder) to get you started with EPIC DataSync. You are encouraged to experiment with these files, as they will not overwrite your existing data (i.e., as long as it was not created for an import), and you can freely add your own test data, and then view or troubleshoot the results.

Here's a quick overview of the three included sample files:

mirror-baseCase.zip
Running this file adds three Users, several Devices, a Group named Network Operations, and a Team named Call Tree to your system. As the filename suggests, the manifest file is set to use the mirror option. You can always run this file to return to the base case and continue experimenting with DataSync.

mirror-updateCase.zip & non-mirror-updateCase.zip
These files make identical updates to the baseCase file data, but use different mirror options to do so. Both files remove the User "Thomas Sanderson" (and his Devices) from the system and add Art Vandelay (and his Devices). Related changes are made to their Team memberships. The examples below go into more detail about how you can achieve the same results for these kinds of changes even when using different mirror options.

Take a Sneak Peek

You're encouraged to work through the examples below and then experiment on your own to gain an understanding of the file content (and the resulting data in the web user interface). But before you do that, go ahead and view the contents of the CSV files and consider how the files relate to one another (tip: refer to the detailed documentation for each file as you do so).

Note in particular the way the Group and Team files are structured so that there is a clear connection between Groups and related Teams. You might also notice that while most of the Devices listed in the files do not have locked 24/7 Timeframes, Roberta Smith's Text Pager Device is locked (after performing the synchronization, view her Text Pager Device in the web user interface and compare its locked Timeframe to the other synchronized Devices).

The following examples assume that you have already completed the preparation steps described in Running ZipSync mode.

Example 1: Adding data for the first time

Let's get started by running a file that adds some sample data for you to build on and update. Remember that you can reapply this file whenever you want to return to this base case after running other files or updates.

To run DataSync on the mirror-baseCase.zip file:
  1. Open a command prompt.
  2. Navigate (cd) to the epic-client-5.5.124/bin folder.
  3. Run the following command (replacing the placeholder in angle brackets as required):

epic file <path>/mirror-baseCase.zip

 

Example:

epic file ~/EPIC_tests/epic-client-5.5.124/samples/mirror-baseCase.zip

 

Log in to the web user interface to view the results of the data synchronization. Try running the file again, but this time with a number of records marked with R (rather than Y) in their Action fields. Were the records deleted, or was the removal instruction ignored with the mirror option active? (Hint: they shouldn't have been deleted.)

Example 2: Updating data with mirror option selected

Now that the base case has been uploaded, let's modify that data by applying the mirror-uploadCase.zip. Note that the DS_USER.csv file has been modified by removing Thomas Sanderson and adding Art Vandelay:

Sample DS_USERS.csv file used to update data with mirror option selected

Also, since Thomas Sanderson belonged to the NetworkOperations_CallTree Team, he has been removed from the DS_TEAM_MEMBERSHIPS.csv.

To run DataSync on the mirror-uploadCase.zip file:
  1. Open a command prompt.
  2. Navigate (cd) to the epic-client-5.5.124/bin folder.
  3. Run the following command (replacing the placeholder in angle brackets as required):

epic file <path>/mirror-updateCase.zip

 

For example:

epic file ~/EPIC_tests/epic-client-5.5.124/samples/mirror-updateCase.zip

 

Log in to the web user interface to view the results of the data synchronization.

Example 3: Updating data with non-mirror option selected

The key difference between the files used in the last example and this example is that here the manifest.xml file has its mirror option set to "N". This means that no mirroring will occur, and any records marked with an action of "R" will be deleted (unless they have been excluded by the deviceNamesToIgnore entry in the manifest.xml file).

Running the non-mirror-updateCase.zip file has the same effect as the mirror-updateCase.zip: User "Thomas Sanderson" is removed from the system, and Art Vandelay is added. In this case, instead of deleting Thomas Sanderson's record from the DS_USERS.csv file, his record remains in the file but has been marked for removal (only part of the file is shown below):

Sample DS_USERS.csv file used to update data with non-mirror option selected

Before running this update, you must rerun the mirror-baseCase.zip to return your data to the same state it was in before you ran Example 2.

To run DataSync on the non-mirror-updateCase.zip file:
  1. If you have not done so already, rerun DataSync for the mirror-caseCase.zip (see Example 1 above).
  2. Open a command prompt.
  3. Navigate (cd) to the epic-client-5.5.124/bin folder.
  4. Run the following command (replacing the placeholder in angle brackets as required):

epic file <path>/non-mirror-updateCase.zip

 

For example:

epic file ~/EPIC_tests/epic-client-5.5.124/samples/non-mirror-updateCase.zip

 

Log in to the web user interface to view the results of the data synchronization. Is the resulting data identical to the data seen after running Example 2? (Hint: the data should be the same.)

Example 4: Excluding Device names from updates

Now that you're becoming familiar with the DataSync process, you're ready to make some further changes to the manifest.xml file. You'll recall that the manifest allows you to exclude Device names from synchronization by specifying them in the deviceNamesToIgnore entry (if you need review, see The manifest.xml file). This provides your Users with the ability to update and augment their Device information via the web user interface without having it overwritten during synchronization.

Assume that want to prevent some Device names from being updated during synchronization. For example, if your deployment includes a Device name of "Mobile phone" and you want Users to be able to maintain details for this Device online, you would modify the manifest.xml file in a manner similar to the following:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">

<properties>

  <comment>Auto Data Sync manifest</comment>

<entry key="autoDataSyncVersion">1.0</entry>

<entry key="mirror">Y</entry>

<entry key="deviceNamesToIgnore">Mobile Phone</entry>

</properties>

 

If you want to exclude additional Devices, separate them with the pipe ("|") character:

  <entry key="deviceNamesToIgnore">Mobile Phone | Home Email</entry>

To exclude a Device name from updates:
  1. Rerun DataSync for the mirror-baseCase.zip used in Example 1.
  2. Open the manifest.xml file in the mirror-updateCase.zip sample archive used in Example 2.
  3. Specify one or more Device names to exclude in the deviceNamesToIgnore entry.
  4. Open the CSV files for those Devices and modify one or more of the details (note what you have changed).
  5. Run DataSync for the mirror-updateCase.zip.

Log in to the web user interface to view the results of the DataSync. Were details for the excluded Devices modified? (Hint: details should not have been modified).

As an additional exercise, try specifying the same Device for removal with the non-mirror option selected (i.e., mark the Device's record with "R" in the Action column) and run an update. This instruction should be ignored if you have properly excluded the Device name.