Monday, January 24, 2011

old web site migration

I have a very old web site which has not been maintained for years on the server that is being replaced. It was mostly an experimentation space, and I doubt it was used. I decided that the migration strategy I would use with it is to just copy over bits, or mark them to return error 410 gone, as I find 404 errors in the logs.

A quick perl script that returns errors from the access log follows.

#!/usr/bin/perl -w
use strict;

while(<>) {
    my($status) = m{^\S+ \S+ \S+ \[.*?\] ".*?" (\d+) \d+ ".*?" ".*?"};
    if(not defined $status) {
        print "failed: $_";
    if($status =~ m{^[45]}) {
        print $_;

I probably haven't updated that site in over two years. I have also considered dropping the web site completely, which may still happen after watching the access logs for a while.

No comments:

Post a Comment