TOTD #17: Backing Up your Blog Posts on Roller

This TOTD explains how to back up your blog posts hosted on Roller-based installations. The instructions are borrowed from Rich's original post.

  1. Download blogapps-examples (1.0.4 as of this writing).
  2. Go to the directory blogapps-examples-1.0.4\\java and invoke ant.
  3. Go to blogapps-examples-1.0.4\\java\\ex02\\dist\\grabber directory and edit config.properties to match your settings. My config file looks like:

    download_dir=./bsc_saved
    blog_apitype=metaweblog
    blog_username=arungupta
    blog_password=<my password>
    blog_id=arungupta
    blog_url=http://blogs.sun.com/roller-services/xmlrpc
    max_entries=1000
  4. If you are running behind a firewall, add proxy host and port information to Grabber.bat as:

    java -Dhttp.proxyHost=<proxy host> -Dhttp.proxyPort=<proxy port> -classpath %_cp_% com.manning.blogapps.extra02.Grabber %1 %2 %3
  5. And run the script Grabber.bat.

All the blog entries are locally stored in the directory specified in config.properties (./bsc_saved in this case). And a convenient grabber-index.html page is generated that indexes all the entries.

There are multiple directories in my blog resources. Moreover I'd like to link the resources to my backed up blog posts as well. So backing up resources seems like a slightly more involved process so I'll try that later. Otherwise Grabber is very cool and convenient for those in-flight and airport lounge times :)

Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.

Technorati: totd blogs roller grabber

Comments:

Thanks very much for this TOTD! I have been meaning to do this for a long time and this solution was very fast and simple.

I'd like to add a little bit here for users of JRoller and/or Linux:

1.) Rich's blog entry that you linked to mentioned that he needed to modify the Grabber.sh script and change a reference from "grabber" to "Grabber"--that still needs to be done if you're on Linux.

2.) The blog url field in the config.properties file for JRoller is similar to the one you have for Sun, i.e.:
http://www.jroller.com/roller-services/xmlrpc

3.) Grabber will halt with an NPE if you have any entries you haven't unpublished yet (because their pub date is null, which breaks subsequent code). To fix this (although those unpublished entries \*won't\* be backed up), just add line (b) below right after line (a) in Grabber.java and recompile with the "ant" command you listed above in step #2.

(a) Date pubDate = entry.getPublicationDate();
(b) if (pubDate == null) continue;

Posted by Glen on November 14, 2007 at 09:38 AM PST #

This is great, thanks for a follow up post!

Posted by Arun Gupta on November 14, 2007 at 10:27 PM PST #

Thanks for the follow up post. It was helpful.

Posted by va refinance on April 10, 2008 at 12:09 PM PDT #

Thanks for the follow up this was helpful

Posted by VA Refinance on April 25, 2008 at 12:33 PM PDT #

How has this changed now that Sun has switched authentication on bogs.sun.com?

Posted by Daniel Lacher on September 25, 2008 at 08:57 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today