Bottom Line: If you’re a Pinboard user, you can automate backing up your bookmarks to Dropbox with cURL and launchd.

I’ve mentioned launchd in past posts a timeor two. It’s a behind-the-scenes program that lets you schedule stuff to happen at a given time (Sundays at 3 AM) or time interval (every 15 minutes) on your Mac.

I saw a post today by Marcelo Somers at that alerted me to a clever way to back up Pinboard using cURL. His method involves a web server ant IFTTT, and had a few issues with my special-character-containing password (courtesy of LastPass), so I decided to tinker with it a bit.

I was able to get it running great, including URL encoding the password, with the script below. Anything with square brackets means you need to fill in your info there (and omit the square brackets).

# Original post at
curl -k -u "[username]:[password]" "" -o "/Users/[username]/Dropbox/[pathToBackup]/[filename].json"

I named the script (which you’ll see in the .plist). Don’t forget to chmod +x to make it executable.

I have it set to be run by launchd every night at 3 AM with this (again, fix the part with square brackets):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<!-- Original post at -->

All together, this will download the backup in JSON format and put it in a Dropbox folder for me. I have Hazel manage the backups to make sure I don’t get overwhelmed with too many. I will probably decrease the interval to weekly pretty soon, I think daily is a bit much.

Thanks for keeping the comments and questions below (instead of via email) so that everyone can benefit from discussion.