How I changed servers midstream

When upgrading this site, I replaced the underlying hardware as well. The old server was just a dead end in too many regards to be worth upgrading in place, and besides, being able to run new and old side by side for a time is helpful.

This type of maneuver is routine work for a professional sysadmin. But it’s been at least two years since I’ve done a similar maneuver at all, and at least five years since I did it with Linux.

When I built the new machine, I gave it a unique IP address. Turnkey Linux makes getting an operational LAMP stack trivial, and depending on what you want to run on that stack, you may even be able to get that installed for you too.

Unfortunately for me, the Geeklog migration tool doesn’t seem to work with WordPress 3.0.1. So I had to get WordPress running on my old hardware in order to migrate. I chose WordPress 2.0.11 because the 2.0 branch appeared to be the current branch when Justdave wrote his migration tool, and 2.0.11 ran without complaint on the dated versions of PHP and MySQL that were on my old server.

After importing the content, I used mysqldump to export my databases. Specifically:

mysqldump --opt -u [mysql username] -p [database name, probably wordpress] > wordpress.sql

I should have gzipped the file, but I didn’t.

gzip wordpress.sql

I then connected to the old server via FTP and transferred the file. Use your favorite file transfer method; I happened to have FTP set up for my internal network.

Uncompress the file if you compressed it:

gunzip wordpress.sql.gz

Then restore the file:

mysql -u [mysql username] -p [database name] < wordpress.sql

Or, if the database already exists, like in my case:

mysqlimport -u [uname] -p [database name] wordpress.sql

Then I connected to the webserver via my web browser. WordPress 3.0.1 saw the WordPress 2.0.11 database and informed me that it needed to be upgraded. So I let it do its thing, and a few minutes later, I had a functioning WordPress site with 10 years’ worth of legacy entries.

I messed around with it for a while. Finally, I decided to go live. And at this point, I should have physically moved the new server into its permanent home. I didn’t do that, so now when I decide to move the server, I’m going to have some downtime.

To flip the IP addresses, you need to know where your Linux box stores its IP address. Debian and Ubuntu both store it in /etc/network/interfaces. As far as I can tell, Red Hat and derivatives like CentOS store it in /etc/sysconfig/network-scripts/ifcfg-eth0, but I haven’t used Red Hat or a derivative in a long time, perhaps 2003.

If worse comes to worse, try something like this to determine where it’s stored:

grep -r [ip address] /etc/

I edited the appropriate file on both boxes, changing the IP address while leaving all of the other parameters unchanged.

I then issued the command ifdown eth0 on both machines.

On my new production server, I then issued the command ifup eth0. Depending on the Linux distribution, it might also be necessary to re-issue a default route command. I didn’t have to do that.

Depending on how much Linux/Unix cred you have at stake, you could just do it the Windows way and reboot the box. Or both of them.

Once I was satisfied everything was working, I powered down the old server and celebrated.

Dinosaur hunting

Today I slipped over to Laclede Computer Trading Company for the first time in many years. I was in search of an ISA parallel card. They’re not easy to find these days, mostly because they aren’t particularly useful to most people these days, but I figured if anyone would have one, it would be them.

No dice. But man, what memories.

Read more

Diving into real estate

You’re not going to believe this. This week my wife and I applied for a mortgage.

Not on our primary house. We’re buying an investment property. I’m still struggling with the mortgage bit.The greatest real estate investment books of all time (for mere mortal working class people, at least) were written by a man named William Nickerson, starting in the 1950s. Nickerson took one and only one shortcut in his investing. He saved up 25% for a solid downpayment, and bought property. Usually property with something wrong with it. He liked small apartment buildings and humble single-family houses.

Then he fixed the property up. Depending on the situation, he’d sell it if it made sense, or more likely, he’d rent it out, then sell when the right opportunity arose.

And when he had enough money to buy another property, he’d buy another one. An outright sale usually would yield enough to buy multiple properties. Or if he could make a trade that made sense, he’d trade properties.

His initial $1,000 investment (which would be more like $10,000 in today’s dollars) grew to $1 million in property by the time he wrote his first book, to $3 million by his second edition in the late 1960s, and $5 million by his final edition in the mid 1980s.

Nickerson argued that his method was the safest investment in existence. He had a point. Land is the one thing God isn’t making any more of, but God is still making new people. People who need land to live on.

But how do you find tenants? What if the house sits empty for a long time? After all, my Dad rented out a property for several years and it was a nightmare. It sat empty a lot, and his tenants trashed the place.

A couple of months ago, I saw a house for rent two miles from me. The asking price was $900. Two days later the sign was gone. Now there are cars in the driveway. So someone rented it. I looked up the house on Zillow. You could buy the house for less than that, if it were available at current market value.

I kept watching. Rentals in my zip code don’t stay vacant long. So when a HUD-owned home a couple of miles away came up at a price we could afford (my wife found it), we went and looked at it. We liked it. It needs work, but that’s why it was cheap. We made an offer, and now we’re a few steps away from buying.

We have some luxuries Dad didn’t have. We’re in a hot market, so we don’t have to rent to the first guy who asks. We can get a family with references. We live close, so we can keep an eye on the place. We can use a management company to help keep everything smooth. We’ll pay more for that privilege but it’s probably worth it. And the mortgage payment is low enough that if it sits for a few months here and there, it won’t break us.

Where house flippers–at least the ones you see on TV–seem to get into trouble is dealing in big, expensive homes and being too leveraged. If the market for $200,000-$500,000 houses goes south, they’re stuck.

This house will never be on TV. Well, the Extreme Makeover guys would love to tear it down and build a sprawling, awkward castle on its L-shaped lot. It’s a low-end house, the kind of place a young family would buy or rent, live in for a few years, and then probably vacate once the kids are done with grade school–if not a bit sooner.

People want large houses in outer-ring suburbs, but they don’t need them. But a young couple that’s outgrowing an apartment does need an affordable house for a few years, and when they outgrow that, there’ll always be another family in the same situation, ready to move in.

So why don’t they just buy the house we had our eye on instead of us? I’m sure some do. But not all of them can afford the downpayment and the money it will take to fix it up.

A friend and I discussed the ethics of buying a down-and-out person’s house, back when Robert Kiyosaki was at his peak in popularity. Kiyosaki appears to have no qualms about it. We were less comfortable about that.

As far as I can tell from the records easily available, this house finished up the foreclosure process in May. A bank somewhere in New York had it for a couple of months. Then HUD ended up with it. I don’t completely understand the process yet.

As it stands now, the house is no good to anybody. HUD’s doing the bare minimum to keep it from getting much worse. It’s eating up taxpayer dollars and making the neighborhood look worse.

The best thing for the house and the neighborhood is for someone with money and who knows what he or she is doing to come in, make it inhabitable again, hopefully make it look a little better, and get someone living there just as quickly as possible.

In my wife and me, they got someone with a little money. We’ll have to learn what we’re doing on the fly.

We’re taking advantage of the former owners who got in over their heads, but when I go to work every day, I’m taking advantage of whoever made the decision to replace a working, reliable computer system based on VMS and Unix with a sprawling monstrosity based on Windows. And my wife would argue that they take advantage of me.

By buying a fixer-upper below market value, fixing it, and renting it at market value, we’re taking advantage of the house’s situation and the future tenants. But the future tenants are taking advantage of us, because they get to live in a house they couldn’t otherwise afford.

I’m not crazy about all aspects of the situation but I’m comfortable that I’m doing more good than harm.

Now, back to that mortgage question. I’m still arguing how quickly and how to pay that off. The math suggests I could ultimately pyramid at least seven properties, using rents from the first two to pay the mortgages on all of the others. And a few short years ago, a bank would have been more than happy to lend me the money it would take to do that.

One latter-day follower of Nickerson makes it his goal to pay off one of his properties per year.

I like the idea of fixing a property, holding it for as long as the tax code encourages you to hold it, then selling and using the proceeds to pay cash for more than one property to replace it. The growth is theoretically smaller, but I really don’t like debt.

But that’s really a question for another year.

How to turn around an automaker

So if you’re a CEO of one of the Big Three automakers, you have to fly a private plane, as corporate policy, for safety reasons.

Congress suggested they save money by flying first class, or plane-pool at the very least.I guess the problem with flying first class is that they might run into some angry shareholders. And maybe one or more of those angry shareholders would recognize them and beat the snot out of them?

But that raises another question. Speaking as someone who lost a lot of money in Ford stock (but back in 2000 or so, so don’t cry too hard for me), how many of those shareholders would have enough money left to fly first class? The angry mob would have to be sitting in coach, right?

But seriously. There’s a lot wrong with the three domestic automakers and cutting the corporate jets isn’t going to fix the problem, at least not alone. But let me tell you a story.

In the mid 1990s, I was briefly the treasurer of a student organization while I was in college. My organization had a serious cashflow problem. At midyear, I estimated the remaining expenses for the year based on bills from the first half, and came to the conclusion that we were spending more money per member than we were taking in.

I made this startling discovery by dividing the amount of money we were spending by the number of members we had. It was a bigger number than the amount of money we charged to be a member of the group.

Sure, it’s sixth-grade math, but someone had to do it.

The problem was that I faced a room full of good-ol’-boy, stubborn German Lutherans, some of whom had difficulty doing sixth grade math, and I just couldn’t convince them what we needed to start charging more.

I couldn’t balance the budget by cutting things, but I figured being $100 short at the end of each month was better than being $200 short. And I knew it would get my point across. So I started slashing line items like the stingy Scottish miser I am (and was). Cable TV? Gone. Telephone service? Gone. But most importantly, everything related to parties and beer got cut. That sure got the good ol’ boys’ attention. After all, the only thing more important to a German Lutheran than stodgy hymnals and poorly maintained pipe organs is beer.

When I refused to sign any checks related in any way to the annual Super Bowl party, I got the changes I needed in the budget. They got a slightly cut-down party, and I got the bank account balance back up above zero. This was a compromise, because I wanted to have a surplus at the end of the year. You know, just in case anything broke sometime and needed to be fixed or replaced.

Sometimes you make cuts in the budget not because it’ll balance the budget, but because it sends a message.

If I were the CEO of an auto company, I’d get the rules changed so I could fly in commercial aircraft. I might even go so far as to fly coach. And I’d get rid of those planes.

I’d also get rid of the executive cafeteria. Bob Lutz argued in one of his books that the executive cafeteria isn’t just a perk, it’s a great place to get work done. The problem is the message it sends. I’m not an auto executive, but somehow I manage to get my fair share of work done over a microwaved lunch from Costco that I bring from home every day and eat at my desk.

Incidentally, my boss eats lunch at his desk too.

I don’t need to eat gourmet food provided by the company behind locked doors in a lavish room to be productive. And if you do, you’re not creative enough.

I’d go even further than that, though. I read that Rick Wagoner made $14 million last year. A $14 million salary suggests that you’re the executive of a successful and growing company. Rick Wagoner is not. Time for another story.

In 1997, there was a struggling computer company in Cupertino, California. This struggling company merged with another struggling company, one that specialized in trying to sell underperforming, overstyled computers that ran Unix. I say trying because nobody was buying.

It wasn’t long before the CEO of the struggling company departed, and the erstwhile CEO of the company he bought became interim CEO.

The interim CEO gave himself a base salary of $1. One lousy dollar. The bulk of his compensation came in bonuses and stock options. I don’t know exactly what his motivation was, but it tied his yearly compensation to performance.

It worked. Prior to his taking the helm, pundits had the company on a deathwatch. I don’t have to tell you how the company is doing today or how it got there. All I have to tell you is the name of the company was Apple, and the executive was Steve Jobs.

I don’t know if Apple would have turned around if Steve Jobs had taken a more traditional compensation package. But it’s safe to say that Jobs is highly motivated. And while I personally don’t care much for the products his company makes, he’s obviously successful.

Taking a page or two from Apple’s book seems like a good move for car companies, starting with executive compensation. How Apple manages to remain highly profitable and successful with a market share of around 10 percent would also be a good case study for U.S. automakers, since it’s clear they’re going to have to live with a smaller market share than they’ve been used to having, at least for a time.

Turning the Big Three around isn’t going to be an easy process, and it’s going to take a lot more than a $25 billion loan from the government to get it done. A true turnaround is going to require a change of culture, lots of shared sacrifice, and the motivation to think long term, far beyond the next quarterly report.

Changing things like corporate jets and corporate cafeterias won’t balance the budget, but it’ll help in the shared sacrifice and changing the corporate culture.

And in the long run, maybe some of those perks can come back some day. I don’t know this for certain, but I’d be willing to bet Steve Jobs doesn’t eat lunch at his desk.

Was California Republican Tony Krvaric Strider of Fairlight?

A story today about the possibility that a prominent California Republican, Tony Krvaric, was once a co-founder of the Commodore 64 warez group Fairlight caused an uproar on Slashdot today. The claim said Krvaric went by the handle of Strider.

Reading it brought back some memories.

Read more

Why I generally buy AMD

I was talking to a new coworker today and of course the topic of our first PCs came up. It was Cyrix-based. I didn’t mention my first PC (it seems I’m about four years older–it was an Am486SX2/66).

With only a couple of exceptions, I’ve always bought non-Intel PCs. Most of the Intel PCs I have bought have been used. One boss once went so far as to call me anti-corporate.

I’m not so much anti-corporate as I am pro-competition.

Read more

What to do when you can’t upgrade WinZIP because wkqkpick.exe is in use

So you’ve got WinZIP installed and have to upgrade it for security reasons. Like a good compliance-minded sysadmin, you run the patch, and the installation fails. You get the error message that wkqkpick.exe is in use.

Since you’re smarter than the computer, you fire up Task Manager to go show wkqkpick.exe who’s boss, only the operating system tells you Access Denied. Now what?

Read more

Playing around with LyX

In what little free time I’ve had the past few days (we have a project that has us in the midst of a death march at work), I’ve been messing around with LyX, a typesetting program for Windows, Unix, and most other operating sytems. I remember messing with it about six years ago, when there wasn’t much else resembling a word processor available for Linux, but this time, I’m more impressed with what I see.LyX is a front-end for a typesetting system called TeX. TeX was developed by the legendary computer scientist Don Knuth when he was dissatisfied with the appearance of his galley proofs for the second edition of The Art of Computer Programming. Knuth had an eye for fine typography, and because hand-set type was increasingly being replaced by machines, he looked for a way to make a computer play by the same set of rules that experienced typesetters have used for the past 500 years.

I had my first exposure to TeX when I was working on a business analysis project with Charlie Sebold. There was a department Charlie and I both did a lot of work for, and supporting these 8 users had ballooned into a full-time job in itself. We had an expensive contractor billing an average of 45 hours a week to the department alone over the course of a year, and when I replaced him, I wasn’t able to knock that down much below 40. We believed there was something wrong with a department of 8 users spending $200,000 a year in computer support. Come to think of it, that may have something to do with why I don’t work there anymore, but I digress. Charlie and I embarked on a project to figure out what we could do to cut those costs. I don’t remember anymore how the writing duties got split up, but Charlie typeset the report in TeX. I remember him being surprised to hear that I didn’t know much about TeX, especially since I had written a book for O’Reilly at that point, and if you look at the early O’Reilly books, they look like they were produced by TeX on the default settings.

Well, intentionally or unintentionally, using TeX for the report was a stroke of brilliance, because the most influential people in the department were design snobs, and TeX produces better-looking output than anything PageMaker could ever do. The text is beautifully justified, with no rivers through it, and the kerning is always set just right, and it will even use ligatures when appropriate. Basically, it does all of the hallmarks of elegant design that they taught me in journalism school–stuff that takes hours to do by hand–and it does it in minutes.

So when Charlie handed that report out at the first meeting, he got us a whole bunch of instant credibility.

What I like about LyX is that it removes the markup stage from TeX. You apply an appropriate document style–book, letter, article, report, or whatever–and you mark lines as whatever they happen to be–standard paragraphs, headings, chapter titles, document titles, author, or whatever–and it handles all of the layout and everything else for you. It’ll even generate the table of contents for you. And if you want an index, just flag words as you write or edit, and it can generate an index.

It also handles the most frustrating aspect of writing that I faced when I was writing my book back in 1999. A good book shouldn’t spent a lot of time repeating itself, so there’ll be times when you’ll refer the reader to a specific chapter, or even a specific page. The problem is, these things change. I not only re-ordered the chapters about halfway through the writing process, I actually took a couple of chapters, combined the like topics, and turned them into two completely differently titled chapters. Finding my cross-references and keeping them straight was such a pain that I really didn’t do it all that much. With LyX, cross-references are easy. You just label a section, and insert a cross-reference to the label, and it inserts the page number and the name of the section for you. You can put a cross-reference on every page and not slow down a bit.

Now that I’ve spent a few hours with it, I heartily recommend LyX. In college I found I got better grades when I turned in papers using fonts other than Times and Arial, and the output from LyX adds a whole new degree of elegance to it. Succeeding in college is as much about playing the game as it is anything else, and LyX gives you that slight edge.

And, as you might suspect, I’ve been playing with LyX for a reason. I’m writing again. Over the course of the past year, I’ve prepared a 133-page manuscript (that’s single-spaced Times with no pretty pictures or formatting, so it’s more than it sounds). I’m in the process of editing and typesetting it now. It’s highly specialized, so I’ll be self-publishing it, rather than using a publisher. I’ll be happy if it sells 1,000 copies and thrilled if it sells 10,000, and no publisher is willing to touch a book anymore if they think a book will only sell 10,000 copies. If it sells 1,000 copies, it will have been worth my while to write. Modern print-on-demand technology makes that a much safer risk than it was in 1999, when I wrote and published my first book.

And while there are times when the help of a traditional publisher definitely makes a better book, I think this is a case where I can create a better product working on my own.

I’ll keep you posted.

I’m still here

Sorry I haven’t been around much lately. I started a new job, with a new commute, and new adjustments. I won’t tell you who I’m working for, other than to say it’s someone you definitely have heard of. I’ll get to work with some new technology (SANs, most notably) and lots of old, familiar technology.

There’s no Linux and no Unix to speak of, but it pays the bills and keeps a roof over our head, and I’m working with good people.I will say that I’m working in Illinois now. I don’t know if the nickname "East Side Dave" will stick or not. Those of you who are from St. Louis or have lived in St. Louis will know that’s probably not the best nickname to have.

Note to potential St. Louis job seekers: If you live in South County and have easy access to I-255, don’t rule out jobs in Illinois. The Metro East is far, far more spread out than the Missouri side, but the commute is much nicer. The traffic is sparse and it flows, there are far fewer Dale Earnhart wannabes, and the roads are in better condition. And my commute time is predictable now. Driving to Town & Country could take me anywhere from 15 minutes to an hour when I worked there. It’s odd now if my commute time varies by five minutes.

The hours will require some adjustment. I worked three different places in 2005, and each starting time was 30-60 minutes earlier than the last. I’m not a morning person and never have been. But when you like the people and you like the commute and you like the work you’re doing, it’s easier to get up early. It wasn’t that long ago that the commute was my favorite thing about my job, and they were planning to move me someplace with a much worse commute.

So I don’t know what this next year will bring, but hopefully I’ll settle into a routine in the next few weeks.

H1B abuse

Hmm. Companies hire H1Bs to pay them less.

And in other news, George W. Bush listens to country music.H1Bs are the worst thing that has happened to the computer industry, aside from all of the massive outsourcing. When you can’t outsource, you drag an indentured servant over here from someplace else and pay him 60% of what you paid his predecessor.

H1B sysadmins make for $17K a year less than U.S.-born sysadmins (such as me). This could explain the dearth of sysadmin-type jobs out there. I had a recruiter contact me this week about a job for an experienced Unix sysadmin. At best I’m a marginal candidate for the job. When he told me the pay, I couldn’t believe it. It was easily $13K a year less than I would have expected, given the qualifications. It’s a step up for me–a small one–but I doubted that someone who was really a good fit for the job would actually take that little.

We’ll see if that job ends up going to an H1B. I suspect it will.

I’ve been contacted for a number of jobs this past week that pay $30,000 a year. No benefits. I told the last guy–obviously an H1B himself–that you can’t live in St. Louis on what he was offering. Well, if you can find an apartment next door to a crackhouse and you drive a 1991 Honda Civic I suppose you can… But I did the math. Adjusted for inflation, that’s less than I made at my first job coming out of college at age 22.

So CEOs slash salary costs and pocket huge bonuses while they take a wrecking ball to the local economy. But they also destroy productivity. I have to deal with a lot of people in my day-to-day job whose first language obviously isn’t English, and it can be hard sometimes. There are an awful lot of problems that come across my desk that literally take 30 seconds to fix. I know this, my boss knows this, and my two coworkers know this. But there are times when I have to read the description of the problem about 12 times before I finally figure out what the problem is and what the writer wanted me to do about it. And I might have to bug one of the other guys to read it to confirm my interpretation. So that 30-second problem can easily balloon into a monster that consumed half a man-hour.

Of course, some genius will take that out of context and use it to argue that U.S.-born workers are lazy, unproductive, and overpaid.

Normally, politicians have no control over the economy. But I think this next crash, when it comes, will be made in Washington.

What economic crash? Let’s think about it. We’ve encouraged a negative savings rate to artificially fuel a sputtering economy, so people are strung out to the point that when gas prices jump 50 cents it’s an economic hardship. Add a 15% cut in salary (whether it happens through a true salary cut or if it happens over the course of several years of raises not keeping pace with inflation) and let’s see what happens. People can’t afford their lifestyles now. Make ’em absorb a 15% cut in salary and see what happens. Oh, and make the bankruptcy laws more difficult while you’re at it.

Yeah, they got smart fellas in Washington. Yee haw.