Submitted by Bart on Sun, 02/22/2009 - 11:33
Social bookmarking services like Delicious are great for sharing your bookmarks with others or just across multiple computers. But one disadvantage of having them stored in a central location is that you have no control over the backup strategy they use. What if they suffer from a system crash and lose all your data?
If you think I'm just being paranoid, think of what happened to Ma.gnolia recently.
Just to be safe, I wrote a simple little script that takes a copy of all my bookmarks - in XML format - and stores it locally on my PC. Because it is in XML format, converting this data to some other format in the future should be fairly trivial.
#!/bin/sh
# Your delicious username and password, separated by a colon
CREDENTIALS="UserName:YourPassword"
# Location where the backup will be stored
BACKUP_DIR="$HOME/backups/del.icio.us"
if [ ! -d "$BACKUP_DIR" ] ; then
mkdir -p "$BACKUP_DIR"
fi
DATE=$(date +"%Y%m%d")
curl --user "$CREDENTIALS" -o "$BACKUP_DIR/bookmarks-$DATE.xml" -O "<a href="https://api.del.icio.us/v1/posts/all"
">https://api.del.icio.us/v1/posts/all"
[/geshifilter-code]
The script is run from cron on a regular basis, so even if something were to happen to Delicious, I still have a copy of all my bookmarks. Lets hope I never need it.
Recent comments