First of all, the changelog data is recreated. The rest is pretty straight forward: Establish a connection to the server. Authenticate, if necessary. Then find out which entries have been added, deleted or changed. Send them. Receive the new information from the server. Back up the old database and then overwrite it with the new data. Send back UID mapping information and store all necessary information for the next sync.