Del.icio.us evacuation procedure for your bookmarks

Thanks to for posting an awesomely simple curl command to dump bookmarks for a del.icio.us account.

@ andrew_k's del.icio.us evacuation procedure

My wife and I both use del.icio.us. The following is a simple shell script I'm running periodically during the day to keep a backup of our bookmarks. I'll keep running this up until Yahoo! pulls the plug or until I find a suitable alternative.

If you need to dump a single account, just hardcode your login and password into the curl URL and run the command as crontab entry directly.

#!/bin/bash
#
# Script: backup_delicious.sh
# Description: Backup delicious bookmarks to an XML file
# Location: /usr/local/bin
# Author: Chad Kieffer, ckieffer at gmail dot com
#
# Sample cron entry:
# 0 9,12,15,18,21 * * * '/usr/local/bin/backup_delicious.sh'
USER=(
  'user1'
  'user2'
)
PASSWORD=(
  'user1password'
  'user2password'
)
for (( i = 0 ; i < ${#USER[@]} ; i++ ))
  do
    /usr/bin/curl https://${USER[$i]}:${PASSWORD[$i]}@api.del.icio.us/v1/posts/all > /path/to/backup/directory/bookmarks_${USER[$i]}.xml
done
exit 0

Share