15 Feb

Using TimeMachine to back up to a Windows share


Apple’s TimeMachine provides a really easy way of backing up to an external hard drive, or an Apple-made TimeCapsule on your network. If you want to back up to a non-Apple drive on your network – for example a Windows share – it’s not so straight forward.

In short, what we do is create a sparseimage and copy it to the Windows share mounted on our Mac. Next, we mount that sparse image on the Mac and set it as our TimeMachine disk. Let’s look at that in more detail.

Create the sparseimage

  • Open your Terminal (it lives in /Application/Utilities)
  • Paste the line below into your Terminal, then press return. This should create a sparseimage called “TimeMachine” on your desktop.
  • hdiutil create -size 500g -type SPARSEBUNDLE -fs "HFS+J" ~/Desktop/TimeMachine.sparsebundle

    The 500g bit sets the size of the sparseimage (in Gb). It needs to be at least as big as the Mac’s hard drive, but give it as much as you can on your Windows share.

  • Mount the Windows share on your Mac and copy the sparseimage to the Windows share.
  • Delete the sparseimage from your Mac’s Desktop to avoid confusion
  • Double click the sparseimage on the Windows share. You should notice what appears to be a disk called TimeMachine appear on your Mac’s desktop. This is actually the mounted sparseimage on the Windows share.
  • Set up TimeMachine

  • Next, go back to the Terminal, paste the command below and hit return. This tells Time Machine to use the mounted volume:
  • sudo tmutil setdestination /Volumes/TimeMachine

  • Check in your Mac’s System Preferences that Time Machine is now set to use the new share.
  • What could possibly go wrong?

    There are two potential gotcha’s here. The first one is that backups will only happen when the Time Machine share is visible. You *could* just remember to connect to the Windows share and double click the sparseimage to mount it every time you restart your Mac. If you’re forgetful like me then you can do it automatically with an AppleScript

    try
    mount volume "smb://path/to/your/windows/share"
    end try
    do shell script "hdiutil attach -mountpoint /Volumes/nameofwindowsshare/ /Volumes/nameofyourwindowsshare/TimeMachine.sparsebundle"

    …simply paste this into a Script Editor window, and select save as Application. Add the saved application to your login items (System Preferences>Users & groups) so it mounts the sparseimage automatically on login.

    The second gotcha is that if you need to rebuild your whole Mac (as opposed to just restore files from a particular date) for example after a hard disk failure then you can’t use OS X Recovery. You’ll need to install OS X from scratch, mount the Windows share and sparseimage then use Migration Assistant. Not particularly difficult, but worth making a note of to save you a panic!

    09 Feb

    Acrobat Fix: Preflight audit trail could not be embedded

    If you use Adobe Acrobat on Mac OS X to embed preflight audit trails into PDF files then you may have noticed a strange error saying “Preflight audit trail could not be embedded” appear as of yesterday afternoon (8th February 2016). This is an issue with an expired Adobe certificate and will prevent you embedding your audit trail and will give you an error that looks like this:

    Preflight audit trail could not be embedded

    Preflight audit trail could not be embedded

    How to fix it…
    The error is down to an expired certificate, and the certificate is just a file that lives inside the Adobe Acrobat app. The first thing to do is to get a new copy.

    To do this, download a new trial version of Acrobat whilst making sure you don’t delete your old copy. So, download a copy of Acrobat DC from here. When you get a dialogue box like the one below, make sure that you untick the box that says “Remove old versions”.

    Be sure to untick "Remove old versions"

    Be sure to untick “Remove old versions”

    Once you have Acrobat DC installed, the next job is to find a copy of the new certificate. Find the app in your Applications folder, control click it. Select “Show Package Contents”. This will show you the contents of the app as a folder structure. Look in this folder:

    Contents/Plugins/Preflight.acroplugin/Contents/Resources/

    …and find a file called Preflight.p12. This is the new certificate file.

    Now, find your old copy of Adobe Acrobat, do the “Show Package Contents” trick again and find the Preflight.p12 file. Delete it and replace it with the new certificate file. Note that the Preflight.p12 file is in different locations depending on which version of Acrobat you have. You may have to hunt around for it.

    If you’re on Acrobat XI (as we are) then the location is:

    Contents/Built-in/Preflight.acroplugin/Versions/A/Resources/

    Restart your Adobe Acrobat and you should be able to embed audit trails again.