birds like wires

Search

Moving Apple Software Update Files

Here’s a fun one. You’ve set up Software Update Server on your Mac OS X Server system and all is fine. Then you realise that you’re the proud owner of a directory containing 52GB of software updates and you’ve put it in a silly place.

You shut down Software Update in Server Admin and move the directory to a bigger drive. You reconfigure the path and then re-enable the server. You see from the logs that all is well and you fire up Software Update on your client machine.

Hooray. That’s not quite what we were aiming for.

Foolishly, I have in the past simply resigned myself to ‘fixing’ this by deleting the software update directory, recreating a blank one and erasing all of the configuration files in /etc/swupd. This is a silly thing to do as you’ll end up downloading that 52GB all over again. It turns out the solution is ridiculously simple.

sudo rm <path to swupd cache>/html/index*

This removes the various .sucatalog symbolic links which are still pointing towards your original software update directory. Software Update Server isn’t clever enough to repair these if the directory is moved, but it is clever enough to recreate them if they’re not there.

After you’ve completed the move, make absolutely sure that the permissions are correct for the drive you’re using (they want to be drwxrwxr-x) otherwise the Software Update service will give you errors that may not at first be what they seem. If permissions are incorrect, the service will report the following in /var/log/swupd/swupd_syncd_log:

Aug 17 17:10:34 xserve.studios swupd_syncd[1001] <Info>: ========== Sync Started ==========
Aug 17 17:10:34 xserve.studios swupd_syncd[1001] <Error>: Unable to retrieve catalog(s) from the Apple server
Aug 17 17:10:34 xserve.studios swupd_syncd[1001] <Info>: Sync Complete

This is exactly the same error as you would see if your server was incorrectly configured behind a proxy and gives you no clue that it’s actually a permissions error, so watch out for it.

Once you’re up and running, if you’ve got any Mac OS X v10.7 Lion clients connecting to your Snow Leopard Server, have a read of Apple’s description of how to host Lion software updates on Snow Leopard servers. Very handy.