Offline Synchronization Process
Perform the offline synchronization process as described here.
Step 1: Download Records
The first step is to download the transaction records to be synchronized from the license server using the serverofflinesynctool.bat (in Windows) or serverofflinesynctool.sh (in Linux) tool:
serverofflinesynctool.bat -url http://licenseServerHostName:port/api/1.0/sync_message/offline
-generate path
where:
• | licenseServerHostName:port is the server name and port for the license server URL from where the records are being downloaded (default port is 7070) |
• | path is the path on the local machine where the records will be temporarily stored |
Additionally, if administrative security is enabled, you must include your authorization credentials in the command. See “serverofflinesynctool.bat” (or “serverofflinesynctool.sh”) for details.
This command can be run on a system with an external network connection or on the hosting license server. If you run the command on the hosting license server, the files containing the data to be synchronized need to be copied to a machine with external network connectivity.
Once the download completes, a message stating the number of transaction records downloaded is displayed:
OfflineSync utility started.
Sync completed for 3 device records.
If there are no new records to download, the message displays the following:
OfflineSync utility started.
No new data is available.
Step 2: Synchronize to the Back Office
Next, use the backofficeofflinesynctool.bat (in Windows) or backofficeofflinesynctool.sh (in Linux) tool to synchronize the records to the back office:
backofficeofflinesynctool.bat -url https://siteID.compliance.flexnetoperations.com/
deviceservices ‑out filename path
The following describes the parameters used in the command:
• | servername:port is the server name and port for the back-office URL. |
• | filename is the name of the file to which the synchronization acknowledgment will be written to (for example, sync_ack.bin). |
• | path is the path on the local machine where the transaction records to be synchronized were stored by the serverofflinesync tool. To specify a specific file, provide the path and file name. |
A synchronization acknowledgment message is returned:
Successfully sent sync data and received a sync acknowledgment.
The synchronization acknowledgment received from the back office is written to the output file (default is syncack.bin in the current directory).
MessageType=”Server sync acknowledgment”
MessageTIme=”Jan 13, 2019 10:53:46 AM”
LastSyncTime=”Jan 13, 2019 10:52:45 AM”
SourceIDType=String
SourceID=BACK_OFFICE
SourceIds=BACK_OFFICE
TargetID=A088B436F208
TargetIDType=Ethernet
Step 3: Update the Synchronization Time
The synchronization acknowledgment needs to be processed on the license server to update the last time of synchronization so that it knows that the data has been synchronized to the back office. When executing the tool, use the same path value used to download and synchronize the data to the back office so that the tool can remove the old synchronized data file after it processes the response. (Additionally, if administrative security is enabled, you must include your authorization credentials in the command, as described in “serverofflinesynctool.bat” (or “serverofflinesynctool.sh”).)
serverofflinesynctool.bat -url http://licenseServerHostName:port/api/1.0/sync_ack/offline
-process filename path
The server responds with the following message:
OfflineSync utility started.
Purging file 20140613T105312.fnesync
Force a Download of All Synchronization Records
The -force option can be used with the serverofflinesync tool if you encounter an error similar to the following:
“Mismatched or out of order time stamp in sync message”: “Expected sync time Jan 24, 2019 11:04:09 AM, got Jan 24, 2019 11:05:00 AM”)
Checking the synchronized records in the back office reveals that those records processed after a mismatch are not synchronized. To correct the problem, you must force a download of all transaction records to account for any records missed during synchronization. The -force option allows you to start the record collection and download from the last successful synchronization time.
To force a download of all records since the last time of synchronization
1. | Process the synchronization acknowledgment on the license server (as described in Step 3: Update the Synchronization Time). This will update the records up to the point of the mismatch. Only those records that were synchronized to the back office are deleted. |
2. | Recover the records missing from synchronization. However, if you try to download the records again, the server thinks it has already downloaded all the records and responds with No new data is available. To remedy the problem, use the -force option with serverofflinesynctool. (If administrative security is enabled, you must also include your authorization credentials in the command, as described in “serverofflinesynctool.bat” (or “serverofflinesynctool.sh”)) |
serverofflinesynctool.bat -url http://licenseServerHostName:port/api/1.0/sync_message/offline
-generate path -force
This will dump all the records since the lastSyncTime specified in the last synchronization acknowledgment.
3. | Run the backofficeofflinesynctool to upload the data to the back office. |
4. | Once the data has been successfully synchronized, process the acknowledgment on the server to update the synchronization date and delete the synchronized data. |