Monday, September 21, 2015

iOS Update

Just in case you should try the same thing: don't.

As I was having different problems with my iPad I thought it might be a good idea to make a clean install.

So I tried these steps:

  • Backup, both local and to iCloud
  • Reset the iPad
  • Update the iPad
  • Restore the data
Fact is, at least when updating form 8.4.1 to 9.0, it won't work.

Restoring the data from an oder backup to an iPad with a newer system version will end up in a mess.

So what I did was, downgrade the iPad to 8.4.1 again and restore the update.

Then update. 

Wednesday, August 12, 2015

ESXi 6.0 on Apple Xserve crashes

After having lots of problems with my Xserves crashing al lot after having upgraded them to ESXi 6.0, I decided I had to solve this.

Basically ESXi 6.0 with vSphere runs on Xserves.

After some time, i found out that it was not the server crashing.
It was the network connection that went down.

I knew this because a) the server was not dead, no PSOD or anything, and on my secondary network interface, the server was still pingable.

So, what did we do:

The Xserve 3.1 comes with these NICs installed:

Intel Corporation 82574L Gigabit Network Connection

So what we did is exchange the PCI NIC to a
Intel Corporation I350 Gigabit Network Connection

Soon after that, VMware released ESXi 6.0U1.

And what do I read in the Release Notes:

VMware vSphere 6.0 Updated 1 Release Notes
An ESXi host might lose connectivity and e1000e virtual NIC might get reset 
An ESXi host might intermittently lose connectivity and e1000e virtual NIC might get reset. An All Paths Down (APD) condition to NFS volumes might also be observed. An error message similar to the following is written to the vmkernel.log file
packets completion seems stuck, issuing reset
This issue is resolved in this release.

You can check if this might be the case if you enter this in the command line of your server:

  1. esxcli network nic list  

If a driver is listed as «e1000e» then you could try updating to 6.0U1

Thursday, June 25, 2015

OS X Yosemite Calendar Server Utilites

So when writing a script to back up my calendar server, I noticed that the folder

/Library/Server/Calendar and Contacts

was using up 233MB. While that might not seem a lot - when keeping 10 copies, it will still use some disk space.

So then it came to my mind, that, when time passes by, there are a lot of events, that nobody no longer cares about.
Surely there must be some kind of mechanism to remove those expired events.

So I went looking around on the command line.

What I found were these commands:


For us especially interesting are these:

You can get some help by calling them with the '-h' option


Usage: calendarserver_export [options] [input specifiers]

This tool reads calendar data from a series of inputs and generates a single
iCalendar file which can be opened in many calendar applications.

This can be used to quickly create an iCalendar file from a user's calendars.

This tool requires access to the calendar server's configuration and data
storage; it does not operate by talking to the server via the network. It
therefore does not apply any of the access restrictions that the server would.
As such, one should be mindful that data exported via this tool may be

Please also note that this is not an appropriate tool for backups, as there is
data associated with users and calendars beyond the iCalendar as visible to the
owner of that calendar, including DAV properties, information about sharing, and
per-user data such as alarms.
  -D, --debug        Debug logging.
  -f, --config=      Specify caldavd.plist configuration path. [default:
      --help         Display this help and exit.
  -c, --collection=  Add a calendar collection. This option must be passed after
                     --record (or a synonym, like --user). for example, to
                     export user1's calendars called 'meetings' and 'team',
                     invoke 'calendarserver_export --user=user1
                     --collection=meetings --collection=team'.
  -r, --record=      Add a directory record's calendar home (format:
      --version      Display Twisted version and exit.
  -u, --user=        Add a user's calendar home (shorthand for '-r
  -d, --directory=   Specify output directory path.
  -o, --output=      Specify output file path (default: '-', meaning stdout).
      --uid=         Add a calendar home directly by its UID (which is usually a
                     directory service's GUID).

This will thus allow you to export a users calendar from the server. Might be interesting one day.

But what I'm really looking for are these:


calendarserver_purge_events -h
usage: calendarserver_purge_events [options]

  Remove old events from the calendar server

  -h --help: print this help and exit
  -f --config : Specify caldavd.plist configuration path
  -d --days : specify how many days in the past to retain (default=365)
  -n --dry-run: calculate how many events to purge, but do not purge data
  -v --verbose: print progress information
  -D --debug: debug logging

So this is the command to delete old events.
In my case, when calling it using the 'dry run' option, I got this response:

calendarserver_purge_events -nv
NOTICE:  there is no transaction in progress
(Dry run) Searching for old events...
6590 events are older than 20140625T000000

So, I could easily remove 6950 events that are more than one year old! Cool.


Now I know that some people often attach documents to events. So we should clean up those as well.
So let's check this out:

calendarserver_purge_attachments -h
usage: calendarserver_purge_attachments [options]

  Remove old or orphaned attachments from the calendar server

  -h --help: print this help and exit
  -f --config : Specify caldavd.plist configuration path
  -u --uuid : target a specific user UID
  -d --days : specify how many days in the past to retain (default=365) zero means no removal of old attachments
  -n --dry-run: calculate how many attachments to purge, but do not purge data
  -v --verbose: print progress information
  -D --debug: debug logging

In our case, a dry run returns this:

calendarserver_purge_attachments -nv
NOTICE:  there is no transaction in progress
(Dry run) Searching for orphaned attachments...
(Dry run) Searching for old dropbox attachments...
(Dry run) Searching for old managed attachments...

Orphaned/Old Attachments by User:

|       User      | Current Quota | Orphan Size | Orphan Count | Dropbox Size | Dropbox Count | Managed Size | Managed Count | Total Size | Total Count |
| wiki-haxxxxxxxxx |      18883053 |      817155 |            6 |     18062725 |           332 |            0 |             0 |   18879880 |         338 |
| Total:          |               |      817155 |            6 |     18062725 |           332 |            0 |             0 |   18879880 |         338 |

That means there are quite some attachments that can be removed that are older than one 365 days.

So, time to write a script that will perform these cleanups once a month.

Wednesday, June 24, 2015

Yosemite: dump calendar server database

I always knew it.

One day that server is gonna crash and that calendar database will be gone.

As it is it happened the day I was going to write my export script.

I was lucky enough to have some backup.
But it's not gonna get me again. So I started writing my daily dump script.

It's not done quite yet.

But the main step is done.
I found out how to successfully dump the calendar database.

The command to do so is:

sudo -u _calendar /Applications/ -h /var/run/caldavd/PostgresSocket/ -f /Users/Shared/calendar_$(date +%Y%m%d).pgdump

Monday, March 23, 2015

Logic Pro X Additional Content download

We want to deploy Logic Pro X in one of our computer labs.

As Logic wants to download huge amounts of additional content when installed and our users are not admins on the lab machines, we have to deploy the additional content as well.

These are the steps I figured out to install the additional content packages via our software deployment.

Same thing as written for GarageBand applies to Logic as well

Here's the link to the plist containing all the information for the additional content packages of Logic Pro X 10.1.1:

To get the information needed, enter this command:

defaults read ~/Downloads/logicpro1010 | grep DownloadName

You will then end up with a list of the packages.

Some updated content is added via App Store.

So maybe there is a better way to do this.

Let's try it this way.

    1. Activate the AppStore debug mode#   
      • Quit the if it is running
      • open the terminal and enter "defaults write ShowDebugMenu -bool true"
      • Start and open the Menu 'Debug > Show Download Folder…"
    2. Download Logic Pro X
    3. Start Logic Pro X - it will ask to download additional content
    4. Allow Logic to download the content, but, when asked for your admin credentials, click 'Cancel'. Do NOT install anything at this point.
    5. Quit Logic Pro X
    6. Navigate to the ausic apps download folder, You can find it in the same folder as the 'iTunes Download Folder'. It will look something like this '/private/var/folders/nc/t8zc00xs2nx1vmcjyxryf11w0000gn/C/' where the part in the middle seems to be a randomly generated string. 
    7. In the folder '' you should now see a folder named '' and inside that another called ''. Here we find what we need: the 'ProAudioCoreContent10.pkg'.
    8. Place a copy of  'ProAudioCoreContent10.pkg' somewhere else from where you can install it later.
    9. Start Logic Pro X. It will no ask you for the credential to install the package, we already downloaded.
    10. Now we come to the additional content.
    11. Select menu 'Logic Pro X > Download Additional Content'
    12. Select any of the additional content packages you want to deploy
    13. Click 'Install'
    14. Wait for the download to complete
    15. When prompted for the admin password, do NOT enter it. Click 'Cancel' instead
    16. Quit Logic Pro X
    17. Inside the directory of the folder containing the download there should now be a folder named ' > > > lp10_ms3_content_2015' and some more in 'lp10_ms3_content_2013'.
    18. In these folders you will now find the packages needed to deploy the additional content. 
    19. Copy these packages to a safe place.
    20. Deploy them as needed
    21. When you start Logic Pro X with the packages installed, you will see that all the additional content is already installed.

    Thursday, January 22, 2015

    OS X 10.9 Mavericks and Keychain

    We had massive problems with OS X 10.9 Mavericks and Keychains.

    Theses problems mainly occurred to users with network home directories.
    It affected some massively while others had not problems at all.
    Even on the same Mac.

    In our case this caused mail and calendar to be unusable to those affected.

    Updating to that latest 10.9 seemed to help somewhat.

    These steps seem to cure the the problems on the other users affected:

    • Delete every folder in ~/Library/Keychains that has a name somewhat like for example 'ABF6C3A9-702E-5666-AE78-0D0D96A676BA'.
    • Delete ~/Library/Preferences/
    • Delete ~/Library/Preferences/
    • Reboot
    • Open 'System Preferences > Internet Accounts'.
    • Select each account and enter the passwords as required
    From there on mail and calendars work seamlessly again.