Sync the external database