Knowledge Base

How to undo the synchronization in CodeTwo Exchange Sync

Problem:

CodeTwo Exchange Sync supports one-way sync of Exchange folders in one-to-many and many-to-one synchronization tasks. If you have already synchronized the contents of a folder it is not possible to reverse it simply by deselecting the synchronization task in the main windows of the program and clicking Save. If you did that, the previously synchronized items would remain in the target folder.

Solution 1 - using filters\conditions:

This solution is based on CodeTwo Exchange Sync version 2.5 and prior. In newer version section "Item Filters" is called "Item synchronization conditions" and you can follow this solution. However in version 2.6.0 and newer there are more options for combining conditions - you can find more information about it in User's manual

In order to clear the target folder of items synchronized via CodeTwo Exchange Sync you will need to use filters\conditions that are available to define as part of One-Way synchronization job. Filters are the component of the application that allow you to synchronize the items that meet the specified criteria. It is possible to apply the filters\conditions after the synchronization without filters\conditions has already been configured and executed. If you do that, the items that do not meet the criteria will be deleted from the target folder(s). The key thing is to use a filter condition that items do not have a chance of fulfilling (e.g. Billing Information data field contain 'non_existing_phrase').

202-0
Fig. 1. The filters let you synchronize selected items only. By making the filter impossible to fulfill you can reduce the synchronized item to zero.

After saving the changes to the main window of the program, the synchronization task that includes a very restrictive filter will clear the target folder(s) of all synchronized items, by which means it reverts to the pre-sync state. Now, it is safe to delete the synchronization task from the main window of the program.

Solution 2 - removing items from the source and cleaning the cache:

To remove synchronized items you would have to remove the synced items from the source folder. Providing the synchronization task is running the removal action will be propagated to the target folders and removed as well. The downside of this method is that you will lose those items from both – source and target folders.

To avoid unwanted loss of data please read the instruction below in whole before applying it to make sure you understand all steps. It is not possible to revert the steps below in the case you change your mind.

For the purpose of making the below instruction as simple as possible let’s assume you have set up just one, one-way, one-to-one synchronization task from folder A to folder B. To revert this sync please follow the steps below. Be aware that this instruction is not recommended if you have more synchronization tasks than just one. Using it when you have more synchronization tasks can make more damage than you already have (see point 7):

  1. Access folder A via Outlook. Please make sure that the user who is doing that sees all items in that folder. Copy the content of folder A somewhere safe, let’s call this place a folder C.
  2. Select all items in folder A and delete those.
  3. Providing the synchronization task is still running the removal action will be propagated to the target folder B which will result in deletion of all items synced from folder A.
  4. Stop the synchronization service.
  5. Delete the synchronization task responsible for A to B sync.
  6. Go to the below location and delete all files:
    C:\Program Files (x86)\CodeTwo\CodeTwo Exchange Sync\Data
    #or
    %programdata$\CodeTwo\Exchange Sync\Data

    This is a cache folder for your synchronization tasks. Unfortunately it is not possible to easily distinguish which file is responsible for what synchronization task, hence the suggestion to delete them all. This way, however, you will remove all your caches so if you have any other synchronization task configured their caches will be deleted too which will most likely result in duplicates in those, after starting the synchronization service again.

  7. Open Outlook again and copy the content of the folder C back to folder A.
  8. Your folders A and B should now look the same as prior to synchronization.
Was this information useful?