Skip to main content
Version: 8.6.x

Using Data Sync Tool

Using the Data Sync Tool and the Import-Export Tool​

The Data Sync Tool and the Import-Export Tool can both be used to populate Self-Managed Commerce with data.

The Import-Export Tool is intended primarily for bulk data population. The Data Sync Tool is intended to synchronize incremental changes from one Elastic Path deployment to another. It’s important to use these tools correctly in order to avoid conflicts and ensure that objects can be synchronized.

warning

Do not use Import-Export to import the same data in two deployments if you are using or planning to use the Data Sync Tool to keep those deployments synchronized.

Some objects’ GUIDs are generated automatically during the import operation. If the objects are imported into both deployments using the Import-Export Tool, the Data Sync Tool will not be able to synchronize them because they do not have the same GUIDs.

The following sections describe supported scenarios for moving data between Elastic Path deployments.

Creating a Staging Environment from Production Data​

  1. Create a database dump of your production database and use it to perform the initial population of the staging database.

  2. Use the Import-Export Tool to import data into the staging environment.

  3. Make manual changes in the staging environment.

  4. Use the Data Sync Tool to synchronize changes from staging to the production environment.

Creating a Production Environment from Staging Data​

  1. Create a database dump of your staging database and use it to perform the initial population of the production database.

  2. Use the Import-Export Tool to import data into the production environment.

  3. Make manual changes in the staging environment.

  4. Use the Data Sync Tool to synchronize changes from staging to the production environment.

Transferring a Change Set Directly to the Target Instance​

To transfer a change set directly to the target instance, execute the following command from the data sync tool directory:

synctool -f -p <changeset_guid>
  • <changeset_guid> is the GUID of the change set data files you want to sync

For example:

synctool -f -p F4D3310C-2AC8-20AA-6B5F-693-E49EF753D
tip

You can create a copy of the synced data on the file system by including the -r parameter and specifying the directory name.

Exporting a Change Set to the File System​

To export a change set from the source instance to the file system, execute the following command from the data sync tool directory:

synctool -e -p <changeset_guid> -r <export_dir>
  • <changeset_guid> is the GUID of the change set data files you want to export

  • <export_dir> is the directory where the change set data files will be created

    Put quotes around the directory if it contains spaces

For example:

synctool -e -p F4D3310C-2AC8-20AA-6B5F-693-E49EF753D -r .\csdata

After this is done, the exported data needs to be Importing a Change Set from the File System.

Importing a Change Set from the File System​

To import a change set from the file system into the target instance, execute the following command from the data sync tool directory:

synctool -l -r <root_dir> -d <import_dir>
  • <import_dir> is the directory that contains the data files (jobunit.dat and jobdescriptor.xml) for the change set(s) you want to import

    Put quotes around the directory if it contains spaces.

  • <root_dir> is the parent directory that contains the import directories

For example:

synctool -l -r stored_change_sets -d 9B6CD70A-1E1B-38E4-B190-A2CDD603C7DE_20091110114748