PERL script to back up your website using your RSS feed
This is a very simple PERL script that grabs your RSS feed, pulls the link for each page, downloads the text for that page and writes the HTML page to your computer’s hard drive. It creates a separate directory by year and month and stores each HTML page in the directory for the month it was published.
So for this website it would create a root directory ‘herselfswebtools.com’ and directory under that for ‘2007′ and under 2007 it would create directories for ‘01′, ‘02′, ‘03′, ‘04′, ‘05′, ‘06′, ‘07′. The full page including CSS, sidebars, etc will then be written in the proper months directory. As of now it does not download and save images.
This first script is intended to be general and able to back up any rss feed website. ( There are two scripts for blogger on the sidebar as well, details coming on them Monday and Wednesday. Or you can just download they and read the notes in the scripts. )
There are two things you’ll need to change both on this line (63):
$content = get ( “http://www.blogger.com/feeds/9999999999999/posts/default?max-results=500&alt=rss”);
You need to change that series of 99999s to your blog id number and if you have more than 500 posts you’ll want to make that a larger number. Or if you are backing up a non blogger website you should just be able to use the rss feed for that site.
Backup Blogger Posts Perl script
You might need to install a Perl module or two. Just follow the directions if you are not familiar with how to do so.
Add A Comment
You must be logged in to post a comment.