Full of lovely web standards information and a large helping of PHP

Backup & Restore Bookmarks to/from del.icio.us

1 year, 9 months ago

I've created a couple of sample scripts which use my PhpDelicious library to backup and restore del.icio.us bookmarks to/from a MySql database. You can view the database schema (SQL) file here, the backup script here and the restore script here.

If you have command line access to your MySql server you can set up the database using the following command:

mysql -u YOUR_USERNAME -p < db-schema.sql

Alternatively you can simply run the SQL from within phpMyAdmin or other similar desktop client to create the database and set up the tables.

I've also made the following improvements to the core PhpDelicious library:

  • Added support for the notes field in post listings (applies to GetPosts(), GetRecentPosts(), GetAllPosts())
  • Added a LastErrorString() method to provide english language explanations of error codes.
  • Added a LastErrorNo() method. LastError() is deprecated (but still available as an alias).

You can download the latest copy of the library including the scripts mentioned above here.

Comments

  • Hi,

    although I cannot contribute anything useful, at least here's something funny regarding backups:

    http://netzreport.googlepages.com/all_those_backups_waste_of_pay.html

    Julio Sanchas - 17th January 2007

  • The simplest way to backup your del.icio.us daily is to add the following to your crontab (crontab -e):

    curl -s https://LOGIN:PASS@api.del.icio.us/v1/posts/all > /home/alpha/misc/delicious.backup

    Of course substitute LOGIN and PASS with your del.icio.us username and password.

    Adam Byrtek - 21st January 2007

  • Adam - thanks for posting this tip. So simple - I can't think why I didn't think of it. Of course there are times when backing up to a database could still be useful.

    Ed Eliot - 23rd January 2007

Help make this post better

Notes: Standard BBCode for links, bold, italic and code are supported. rel="nofollow" is added to all links. Your email address will never be displayed on the site.

Back to index