Offline Sync - Performing a Full Re-sync

Niamh Ferns Updated by Niamh Ferns

PERMISSION REQUIRED: Local administrator access to the Offline Sync server, and the MySQL root password set during the Offline Sync install.

Introduction

A full re-sync clears the Offline Sync agent's saved state so the next run treats the server as new and pulls every document from Prompt again. Use it when documents are missing from the offline site and a normal sync has not brought them across.

For general Offline Sync troubleshooting, see How to manually trigger or troubleshoot the Offline Sync process and Why a document may not appear in Offline Sync.

Before You Start

Steps

Clear the sync state
  1. Log on to the Offline Sync server with an admin account.
  2. Open MySQL Workbench. If it is not installed, install it using the link above.
  3. Connect to the default Local instance (host localhost, port 3306, user root) using the MySQL password set during the Offline Sync install.
  4. Open a new query tab and run:
    DELETE FROM promptoffline.syncagentstate WHERE Id > 0;

    The WHERE clause is required because Workbench's safe update mode blocks a DELETE without one.
Start the sync
  1. Open Task Scheduler.
  2. Find the Prompt Offline Sync task, right-click it and select Run.

Note: You can also run the sync exe directly. If you do, do not click inside the console window while it is running. Windows QuickEdit mode will pause the process until you press a key.

Wait for the sync to finish

Monitor the log file for today's date:

C:\Program Files (x86)\Prompt\PROMPT.Offline\sync\logYYYYMMDD.txt
  • At the start of the run it should show LastSyncDate: 1/1/0001. This confirms the sync state was cleared and a full sync is running.
  • When finished it will show SyncAgent completed.
Check the result
  1. Count the files in the offline documents folder:
    C:\ProgramData\Prompt\PROMPT.Offline\Documents
  2. In MySQL Workbench, run:
    SELECT COUNT(*) FROM promptoffline.documents;
  3. The two numbers should match.
  4. Open the offline site at http://localhost:8080 and spot-check a few of the documents that were previously missing.

Troubleshooting

  • Log does not show LastSyncDate: 1/1/0001: the sync state was not cleared. Re-run the DELETE in step 1, confirm it reports rows affected, then start the sync again.
  • Log stops updating and there is no SyncAgent completed.: if running the exe manually, check the console window title for "Select". QuickEdit has paused it; press Esc or Enter in the window to resume.
  • File count and database count do not match: see Why a document may not appear in Offline Sync.

How did we do?

Is PROMPT endorsed by the Department of Health?

Log-in Screen - Why do I get the log-in screen when I click on the anonymous user link?

Contact