The recent implosion of Ma.gnolia and a growing skepticism of entrusting your data to the cloud got me thinking about the data I’ve got that’s “out there.” One particular point of vulnerability is Delicious, where I keep my bookmarks.
Fortunately, Delicious makes it pretty easy to download all your bookmarks if you know what you’re doing. Unfortunately, you have to know what you’re doing, at least a little.
With that in mind, here’s a simple Applescript that any Mac user can run to create a backup. Delicious requests that you do this sparingly, so I’d recommend doing it only, say, once a week.
To make this work, open Script Editor on your Mac (it came with it, and should be lurking about somewhere unless you deleted it) and paste the following into it, changing the username and password. There may be a linebreak on the last line—edit it so that it is all on one line. Save it using “Application” as the file format with whatever name you like—this will result in a mini app that you can double-click to run.
Running it will create a file called deliciousbackup.xml in your Documents folder. That file will not be in the most readable format, but it will have all your data. Each time you run it, it will overwrite the previous version of the file. It would be possible to do multiple snapshots, but I haven’t gotten that fancy.
set thefile to "deliciousbackup.xml"
-- change myusername to your username, keep the quote marks
set theusername to "myusername"
-- change mypassword to your password, keep the quote marks
set thepassword to "mypassword"
-- this is where the magic happens
do shell script "curl https://" & theusername & ":" & thepassword & "@api.del.icio.us/v1/posts/all -o \"$HOME/Documents/" & thefile & "\""