Archive for the 'Challenges' Category
Easy backups at home
Ignoring the smarts that may exist in off-the-shelf backup software these days, I’ve decided to include some info on how I backup my laptops*. I’m also without a fancy one-touch hardware based backup solution, but I was equipped with:
- 1 x 320gb drive
- 1 x Vista Laptop, 80gb total drive space
- 1 x XP laptop, 80gb total drive space
- A general desire to make things as easy, painless and low-tech as possible.
Step 1 – Pre-requisites
To begin, I downloaded Robocopy from the Microsoft website, note that this is a part of the Windows 2003 resource kit and is required on the XP machine only. Vista is already that smart. Robocopy is a Robust File Copy utility which we’ll use to do all the hard work for us via batch files. Watch out for rogue copies of software pretending to be robocopy, downloading from the Microsoft website is the best bet here.
Next, I need to plug in my Backup drive to my computer. If your computer has USB 2.0 as well as 1.1 ports, be sure to choose the 2.0 one to ensure the fastest transfers. Windows should let you know if you’ve made the wrong choice. When you’ve plugged in the drive, open Windows explorer and take a note of the drive letter.
Step 2 – Scripting magic
Here’s a simplified version of what I run:
echo “Starting backup process \n”
ROBOCOPY c:\ g:\firstLaptop /e /zb /R:3 /MIR
echo “Completed backup process.”
I told you Robocopy was worth the 11mb download.
In pseudocode that would look like this:
[Run Robocopy.exe] [Copy from] [Copy to] [use these options/flags for Robocopy]
Let’s look at the flags in use:
- /e = Copy subdirectories, including empty ones
- /zb = Use restartable mode
- /R:3 = Number of retries if a file copy fails (default is 1 million!)
- /MIR = Mirror a complete directory tree
You’ll see that these options are all about maintaining a mirror of my laptops and taking the intelligence out of the process. The first time I run it, it takes forever. The next few times its appreciably faster as it performs a file compare.
Step 3 – Room for improvement
This pretty much meets my needs as neither of my computers have anything mission critical aside from photos or mp3s. Everything else is either online or recreatable. Primarily I’d put in a timestamp at the start/stop of the job and use some of the additional features of robocopy to make it prettier and easier.
* This in now way addresses the need for multiple off-site copies etc of your data. I may address this at a later time.
Comments are off for this postTroubleshooting a sick laptoptopia
Laptoptopia began for me back in Feb 07. I was dismayed by a failed desktop pc that had promised much, and couldn’t face another similarly sensible choice. I decided a laptop was my future.
I did very little research, but basically decided that I wasn’t in the market for an ultra portable, and I wasn’t in the market for a desktop replacement. I needed to do ‘stuff’, but I didn’t need to pay extra to be able to run some high end apps and games. Wouldn’t happen. So for just over AUD$1000 I got myself a Compaq v3000 series. The battery sucks, vista took some getting used to, but otherwise it did all I needed. Unbelievably Domayne had the best deal and warranty, though the most offensive sales person.
So here I am 8 months later. I’d gotten used to logging on and doing nothing in particular. It was my only HDTV. It was my study vessel. It was handy. Then one day when I was reading about foldable kayaks it stopped. Being the infrastructure IT professional I am, I gracefully rebooted it by popping the battery. Being a Vista user made me pretty comfortable with doing some pretty odd things to maintain service*. Unfortunately laptoptopia was never to return.
Now I boot and am met with a series of beeps. My immediate reaction was that my computer may have been complaining in morse code. I asked google, and was told a bit more about beep codes. More info on HP laptop beep codes here and general beep codes here. None of them look particularly reassuring right?
Lucky I purchased the warranty. We’ll see how that goes.
* Not a subtle Vista dig, I thought it took some getting used to and was originally not particularly stable. Now I like.
Comments are off for this postIn need of a fancy WHOIS lookup
A relative had a child recently, and I thought it was a very ‘now’ thing to do to register them a domain name. It might not be for much more than baby photos now but it might be a useful myspace redirection when they’re an angsty teen. Completely infatuated with my new web host I thought I’d kick the domain registration their way. A few clicks and I’d confirmed the availability of the new domain and registered it. Awesomely easy and I felt like a technical genius.
As my webhost of choice acts as both a host and a domain registrar, I had to run through the final step of setting it up to be actually hosted (2 month old children aren’t awesome at doing such things themselves). It failed immediately, which led me to believe I’d done something wrong.
I checked their support wiki, I’d appear to have followed the steps. Really there’s no rocket science involved, so I don’t see how I could have screwed it up. That being said, it hadn’t actually worked, so evidence suggested that I had in fact screwed something up.
Next was time to eliminate some of the obvious stuff. Unfortunately I had a pretty short list:
- Try again. Nope, still doesn’t work.
- Try again using a different option (e.g. Park the domain). Nope, still doesn’t work.
- Check that the domain name has propogated. Yes, whois records show my registration and I can reach it from other sites on the interweb. All a-ok.
- Um, Try Again. Still doesn’t work.
- Raise a support request. Try to not sound like a lunatic.
(Yes, I should be in testing)
A quick back-and-forth with the support team and I learn that I can’t add my newly registered domain to my host because it’s already registered under an expired account there. No, that wasn’t in my list above of random tasks to try. Seriously though, even if it was in someone’s account they didn’t hold the registration for the domain itself. Obviously it wouldn’t have let me register a domain that belonged to someone else, and I did a WHOIS from a different registrar to start with, so as far as the internet was concerned, this was up for grabs.
I tried to plead my case, as this sounds a little crazy, and my request has been moved to a different support queue. It got me thinking though, aside from my receipt for payment, I have nothing to refute the history of the domain. I didn’t even think to check this. What if it was chock full of unsavoury content in a previous incarnation? How can I find out what has gone before?
1. Google Cache: I decided that this would show me nothing so I didn’t check it first. I generally use the cache to check out sites that are offline when I need them.
2. WayBack Machine: The Internet Archive is the most awesome at this sort of venture. Ultimately you either love or hate that it exists. There’s always stuff you wish wasn’t archived, but it usually pretty useful. No matches for my site.
3. Search for WHOIS history tools: I guess this is all I really wanted, I just wanted to confirm that it had been registered before. I stumbled upon domaintools.com and it looked perfect. Unfortunately the front page did little service to a skim reader such as myself and I came away with the conclusion that additional funds were required. A little frantic searching later and I found their ultra awesome subdomain: http://whois.domaintools.com/. Running a WHOIS from there not only returns the WHOIS record, but gives me some added extras including the host, web server software and history. Perfect.
4. Google Cache: I did eventually check google for completeness. It did return me results indicating my domain of choice had come up on lists as about to expire back in March. That was enough info for me to use in the first place to confirm that it had been registered previously and that the registration had long since expired.
Conclusion: The unexpected will always arise, the simplest solution is best and bookmark whois.domaintools.com.
1 commentMigrating wordpress blogs between hosts
I’m about to move web hosts from one that’s not so great, to one that seems pretty great. I’ve had a pretty active wordpress blog on another host for over a year, so I’d prefer a smooth change.
I’ve been damn impressed by wordpress as a really simple and extensible web content management system. I like it, it’s easy to use, I can dabble in PHP code or MySQL if I feel the need, but it’s not a requirement. WordPress provide pretty regular code updates and plug-ins that would satify my every whim. Right now, my only dream is a smooth migration. I want to retain the look & feel, content, posts and users from the previous system.
But how?
WordPress have their act together as usual and have included an import/export function within their v2.2 codebase. In a simple click of a button it throws my year long rambles into a massive XML file. Three seconds into the exercise and I seem to be living the dream. Naturally, not everything quite works as it should and I seem to be missing a few months worth of the most recent posts. As this is when I feel I was at my wittiest, I must retrieve them.
Here’s my approach so far (will update the list as I learn more):
FACT #1: Opening the XML file generated in Internet Explorer suggests some problems in the XML validation.
THEORY #1: Internet explorer often sucks at tasks like this.
INVESTIGATE #1:
- [LowTech - NOTEPAD / IE] Look for possible XML-unfriendly characters in the text, tracking to the char that IE identified. I opened the file in notepad (ouch), and did a search and replace where I found bad characters. Periodically reopened in IE. Repeat. It’s tedious and really didn’t look to be a quick fix, particularly as I was struggling to find some of the bad characters.
- [FreeTech - UltraEdit] Oh how I used to love UltraEdit back in my ASP dev days. I think I might purchase it, but certainly not for this purpose. Made finding the duds easier, but essentially it was a pretty notepad for this exercise.
- [ShareTech - XML] I downloaded an XML validator, hoping for a ‘fix stuff’ button. No joy, and the validation was pretty inconsistent. Uninstall.
CONCLUSION #1: Trial import into wordpress actually accepts the file. Assume that this is wasted effort for now. Valid XML is not the problem (for now).
[ -------]
FACT #2: The file is missing the content and isn’t closed properly.
THEORY #2: WordPress or the web server are misbehaving.
INVESTIGATE #2:
- [LowTech - Repeat] Sounds stupid, but I thought I’d try it again. I actually got a slightly larger file, but a few posts closer to success still isn’t success. Problem remains.
- [FreeTech - Cheat] Checked the various WordPress support forums. Others have similar problems, but no one seems to have described mine. Post my own question. Fingers crossed.
- [ShareTech - Upgrade] Newer = better, right? I upgraded both blogs to v2.2. Same result.
- [HighTech - Web server logs] Simple. Grab the IIS logs from my old server, find the line which suggests someone was running export.php, check the status code. In this case it was 200, which is fine. There’s a chance security or max file sizes on the server forced the truncation, but nothing I can locate so far. This one’s not officially ruled out yet.
CONCLUSION #2: Investigation on web server settings are ongoing. Good times.
[ -------]
FACT #3: …
THEORY #3: The export function doesn’t work.
INVESTIGATE #3:
- [HighTech - Master mySQL] This is boat rocking at it’s finest. Basically its all about mucking around with the DB behind the scenes. Normally I’d be ok with this, but I love that wordpress doesn’t usually require this. I’m going to hold out as long as I can, but the steps I’ll need to do are:
I’ve installed an ‘empty’ wordpress DB on my new host, using the Dreamhost one-click install; I’ve generated an SQL script from my old host which would populate a WordPress using phpMyAdmin; I’ve ftp’ed the file to my server ready to run; I’ve completely lost the ability to access mySQL via SSH on my new host. Problem is likely me, though this will stall my progress a tad in the meantime. CONCLUSION #3: Searching for alternatives, but mySQL play looks likely.
More updates to come.
Comments are off for this post
