All | 43 Folders | Accessibility | BoingBoing | Books | Computer Related | Family | Films | General | Hacking | Hobbies | Humor | Java | Links | Omni | OpenSolaris | Puzzles and Games

« Ubuntu Behind a... | Main | Vacation Again »
20060217 Friday February 17, 2006

Backing up Your Blog Posts

Dave Johnson (that's him on the left), has done a new version of the Grabber application that allows you to create your own backup of the blog posts you make here on blogs.sun.com (or other roller-based blog installations).

This is just one of the examples and utilities from the upcoming Manning Publications book RSS and Atom In Action.

Dave kindly adjusted Grabber so that it puts lines like:

  <h1>Another Blog, another first entry.</h1>
  <p id="permalink">http://blogs.sun.com/roller/page/richb?entry=another_blog_another_first_entry</p>

at the top of each saved entry, so that I'll be able to easily use them with my Tag Cloud generator. I'm sure others will find them useful too.

Here's how to create a backup of your own roller-based blog.

First you need to download and unpack the blogapps-examples tarball. Then run Ant in the java sub-directory:

  % cd .../blogapps-examples/java
  % ant

The new Grabber application can be found under .../blogapps-examples/java/ex02/dist/grabber.

I then modified the Grabber.sh script in that directory. I had to change the line:

  _cp_=${_cp_}:./lib/grabber.jar

to

  _cp_=${_cp_}:./lib/Grabber.jar

I also had to add in the HTTP proxy server and port information so that I could get through our Sun firewall. Something like:

  ...
  java -Dhttp.proxyHost=<myproxy.mysubdomain>.sun.com -Dhttp.proxyPort=8080 \
        -classpath ${_cp_} com.manning.blogapps.extra02.Grabber $1 $2 $3

I then adjusted the config.properties file in that directory to contain the information pertaining specifically to my blog. This now looks something like:

  % cat config.properties
  download_dir=./saved
  blog_apitype=metaweblog
  blog_username=richb
  blog_password=<my password>
  blog_id=richb
  blog_url=http://blogs.sun.com/roller/xmlrpc
  max_entries=1000

Finally, I did a complete backup on my blog posts into the "saved" subdirectory with:

  % cd .../blogapps-examples/java/ex02/dist/grabber
  % ./Grabber.sh

When I return from vacation, I'll modify my Python tagcloud.py script to take advantage of these changes and make it available for others to use.

Thanks Dave!

Update - 26th Oct 2007:

Note that you now need to use:

blog_url=http://blogs.sun.com/roller-services/xmlrpc

in the config.properties file.

[]

[]

( Feb 17 2006, 09:02:53 AM PST ) [Listen] Permalink Comments [3]

Comments:

Would this work for Blogger? It's not Roller-based, but does provide an Atom API... I've been using wget, which is okay. The Blogger suggestion isn't all that friendly, either: http://help.blogger.com/bin/answer.py?answer=130&topic=12 --Scott

Posted by Scott Hudson on February 17, 2006 at 01:35 PM PST #

Hi Scott,

I don't know. Dave (Johnson) would be the guy to ask. Maybe he's answered your question in his book...

Posted by Rich Burridge on February 17, 2006 at 01:40 PM PST #

Blogger supports a very old draft version of the Atom API, back before it was renamed to the Atom Publishing Protocol (APP). Once Blogger supports the APP, I should be able to make Grabber (and the rest of the Blogapps utilities) work there too.

Posted by Dave Johnson on February 20, 2006 at 08:56 AM PST #

Post a Comment:

Comments are closed for this entry.