I set this task aside awhile back. When I returned to it, we had moved the source repository to a different machine. I had lots of changes in my local sandbox. Several of the prerequisite libraries had been upgraded. Etc. After doing all the catch-up work and checking it in, however, it compiled and ran right out of the box! I’m always surprised when that sort of thing happens.
So, every time I upgrade my system, it seems like my printers break. I don’t know if it’s bad management of the cups debian packages, the peculiarity of windows, or my own incompetence. The breaks have wildly varying symptoms. So, I haven’t seen a pattern in them that allows me to fix things gracefully. Sometimes Samba is to blame. Sometimes CUPS (-PDF) is to blame. And sometimes Windows is to blame. Well, when I upgraded from Lenny to Squeeze awhile back, of course it broke my virtual PDF printer that I use to generate electronic invoices. When I’d try to connect to the printer (as configured in Lenny), I got the following error:
Windows cannot connect to the printer. Operation could not be completed (error 0x0000000d).
(No, it wasn’t in those colors or with that background… but I figured I’d try to find a way to make you, dear reader, feel as annoyed as I felt when I saw the error.) Anyway, with such a wonderfully informative error, I didn’t know quite where to turn. The logs (cups, samba, auth.log, syslog, etc.) on the server gave no indication that anyone had tried to connect. And I could browse the other shares from the vista machine nicely and those connections did show up in the logs. So, I had a strong indicator that the problem was NOT my upgrade from Lenny to Squeeze. But, being the stubborn idiot that I am, I started fiddling around with the printer and samba configs anyway…. which lead nowhere, of course. The upside is that I am just a smidgeon more familiar with cups and samba. [sigh]
When I finally typed the error into a search engine, I found the answer provided by some participants of Microsoft TechNet, which I repeat here for posterity:
From: AHarsent I've seen this problem with a few printers now, not consistantly[sic] between any particular makes or models. However, I have found a consistant[sic] fix to connect to any network printer from vista: Run a command prompt and type the following: net use LPT2: \\servername\printer This sets up a behind-the-scenes connection to the printer. Then go through the add printer wizard, choose to add a local printer, and choose port LPT2... It will probably ask for a printer driver, and you can just choose whatever XP driver you might have been using before. The printer is then installed without any errors, and works just fine.
Of course, since I’m using CUPS-PDF, I don’t have a printer driver. I just use the Generic MS Publisher Imagesetter, which seems to work nicely. And now that I’ve made the right sacrifices to the right gods, I’m back to being able to generate PDFs from any program on the windows machine.
Disks Die, Laptops break, Bags are Stolen.
It’s more or less a fact of life,
In the 4 year process of transitioning from a noisy sun E-250 in the garage to something that could actually be in the same room with you I arrived at the above network arrangement.
Most of the my data is hosted by a central server and when I had more systems all of the home directories were NFS mounted (which is a major PITA on OSX). In the last hear I have worked primarily on my MacBook, occasionally syncing my projects with the file server. After migrating to leopard I purchased a 1 Terabyte external disk and backed up both the file server and my laptop using “Time Machine”. As I worked more and more on the laptop I did less and less syncing of the work to the file server. The thing about time machine is that its thoughtless. Set it up and as long as you get your laptop home and leave it on for a few hours and it should keep your work safe for you.
Two weeks ago My Bag was stolen.
On top of the work I had actively been doing I lost two active sketchbooks and in the end this loss is probably the most painful. Since I couldn’t immediately restore the data using the process described below, I spent much of last week recreating the designs for this months workshops. Once the critical work was done I turned to see what I could recover. I had used time machine to restore a couple of files I had foobared but I had never had to restore all 270G of data and applications. My Intel Imac did not have enough disk nor did it have most of the software. So I bought a 1T disk from Old Town Computers and “CarbonCopyCloner“ed a bootable operating system onto it and put it into my Intel Imac (Ernesto).
WHERE’S MY BACKUP?!?
After googling around I found that I was supposed to restore my files using the “Migration Assistant” tool. I had used migration assistant to move users and applications to new systems but never to restore files. When I first tried the migration assistant I mounted the disk remotely but I couldn’t see the backup. So I moved the disk to the target machine. Even then I only saw the option of restoring the server and not my laptop.
Panic set in until I found a file named with my laptops name and a .sparsebundle extension. Right clicking on this lets me open it with the appropriate mounting utility. But…. Not until it had checked the file system. Walking away and doing something else for a few hours let me come back to the image mounted. When I ran the migration assistant again the option of restoring the laptop was there.
Starting the restore process and going to sleep I woke to find that it had successfully restored all of my data and applications! I was only out the extra time on the designs and the actual property.
Now all of my active work was on a disk which was large enough to also contain the rest of my images/music/video and web content which had been kept on the file server. Since I could see the fileserver’s backup and I was so happy with my success I tried then to restore the file server data.
Mounting your home directories on external disks on OSX is a lot like mounting them remotely. It just plain sucks. Half the time if I made any changes in the disks connected to the file server it would mount them in a different place. Then when you logged in it would create a new mount point and empty directory and you could not remount the disk where it was supposed to be until you removed the new directory.
When I restored the file server user I had few options. I could restore the user (giving an estimated size of like 20 meg , not the >400G I expected) and on the next screen I could restore the file system at the top level directory. This did not show me enough data to represent the data directory either. I could also have restored the entire system and then re-restored the Intel files over it but I really didn’t want to deal with the mess.
So I punted.
I just plugged the file server disk in and dragged my home folder to the new disk. I will probably test the restore process to the file server with the external disk attached to make sure the data is recoverable on that system. Once this is done I will reformat the time machine disk for future backups and send the file servers external disk to another state. In the mean time I will rest better knowing that my time machine backups actually work transparently while I work.