||[Mar. 9th, 2002|03:22 pm]
LiveJournal Client Discussions
Trying to figure out how to retrieve/backup all entries. |
I know syncitems will return all the events updated using sync_total. But can someone suggest a good way/algorithm to make sure i have all the entries?
2002-03-09 03:47 pm (UTC)
Thats fine, this server is not clustered, so no problem. (initially designed for non lj.com, but will be when fixed)
and from what i see (quickly, and i think some files are missing) it just stores the last time retrieved, and rerequest more entries?
and it probably does or should check to see if sync_total == sync_count...
(and it looked like to me sync items works *shrug*)
2002-03-09 05:35 pm (UTC)
Yeah, I think you got it. I must admit I haven't looked at that code in a while.
I think it's like this:
set the "lastsync" field in your request to the synctime of the last item you received
make the request
save all of these sync items, making sure to not save duplicates twice
} while (total items received < totalcount that lj gave you)
(a perl syncitems client) might be helpful... It's commented pretty well. It looks like you're right. You just keep going until sync_count == sync_total.
And I'm pretty sure syncitems still works, even with clusters.