rentzsch.com: tales from the red shed

Backing up del.icio.us

Notes
I've now started using del.icio.us in earnest (I've added a link to my bookmarks on rentzsch.com's sidebar) and posted some 70 links today (mainly from walking my current bookmark stashes and uploading them).

It struck me it would be bad news if del.icio.us went non-accessible (or totally Went Away). So I started digging for a way to backup my submitted bookmarks.

It was a little harder than I thought it was going to be, but fortunately I knew Buzz's Delicious Client had to do the same thing. So, I fired up tcpflow and watched the conversation. Ah-ha, turns out you don't supply your real delicious account password when hitting the API -- you just use "del.icio.us" as your password.

So, you can use the following command to backup all* your delicious postings:

curl --user accountname:password -o myDelicious.xml -O 'http://del.icio.us/api/posts/recent?count=10000'

Except, you'll probably want to replace accountname with your del.icio.us account name and password with your password (which is apparently set to "del.icio.us" by default).

*Well, at least the first 10,000.

Update: I screwed up and apparently never set my account password to what I intended when signing up for del.icio.us. I've amended the instructions here to reflect that you do need to supply your real password when bouncing off the API. Thanks to John Christopher Burns for pointing this out.

Update: Brett Bonfield writes about backing up using Windows:

I really appreciate your guide to backing up del.icio.us. I had to modify it slightly for Windows (at least XP - maybe your instructions work for other breeds of Win32 OS).
  • I downloaded curl at http://curl.haxx.se/latest.cgi?curl=win32-ssl and the zipfile of the Windows 0.9.7d OpenSSL binary packages found at http://curl.haxx.se/download.html
  • I copied the two dlls from the OpenSSL package into the main folder ofthe curl package.
  • Then I ran
    curl --user accountname:password -o myDelicious.xml -O "http://del.icio.us/api/posts/recent?count=10000"
    from the DOS command line. Note double quotes. The single quotes didn't work.

Silvan also detailed out how to use wget instead of curl.

Update: You know, you don't have to mess with this command-line curl and wget stuff to pull down a backup. You can just bookmark http://del.icio.us/api/posts/recent?count=10000 and use most any web browser to pull down the resulting XML file. Thanks, Issac!

Update: Buzz points out a sudden del.icio.us API change. Thus, you should change your backup url from http://del.icio.us/api/posts/recent?count=10000 to http://del.icio.us/api/posts/all. Also note the <post> elements now come in chronological order. Previously, they came in reverse chronological order.

Update: Richard Soderberg points me to Dietrich Ayala's Foxylicious, which integrates del.icio.us with Firefox. Safari users should check out Christina Zeeh's delicious2safari.

Saturday, August 07, 2004
12:00 AM