I confess, I am a big fan of all things Apple. The last couple of years I’ve owed many wonderful devices Apple’s produced. Their computers as well as portables. I’ve also been working as an IT support guy/consultant long enough to know that backing up data is essential. Hard drives fail, computers get stolen…
When it comes to Apple’s portables, things get a little more complicated. Unless, of course, you’re fine with plugging in all the cables the instant you come home (or your office), or have a couple hundred bucks to spend on Apple’s own Time Capsule.
But –as the saying goes– for any problem there’s a solution. And this one is as cheap as you make it to be; the price will depend on how expensive external drive you buy.
Before we start…
If you haven’t created your network share on a Raspberry Pi yet, give Create a Kodi box and Network Share on a single Raspberry Pi a read. It will guide you through all the steps needed to do just that.
Also, I will presume –since you’re about to go through this rather technical process– you know what and where Disk Utility app is, what a network share is, and have a basic knowledge of working with the Terminal app.
Creating the Time Machine disk image
It’s very easy, and you can do it with just a few clicks using the Disk Utility app. Launch it.
Once your Disk Utility app is up on your screen, go to
File -> New Image -> Blank Image. You’ll get a new slide-down window that looks like so:
- Fill in the Save As and Name (you can have these two the same just as I have it – makes life simple).
- Select where you want to save it (don’t worry about the location too much because we’ll be moving it onto the share drive later on)
- Set the Size to whatever you see fit. I usually set double the capacity of a drive I back up onto the Time Machine partition.
- Set Format to
Mac OS Extended (Journaled)
- Leave Encryption at
noneand Partitions at
Single Partition - GUID Partition Map
- Change Image Format to
sparse bundle disk image
NOTE: Regarding the size, you’re basically setting the disk image’s maximum size so you don’t need to worry if you only have 100GB of space left on your system drive and need to create a 500GB sparse bundle. It’ll start at a couple hundred MBs only, increasing real size as needed.
Once you have all the above set and checked, click the Save button. It’ll take a bit of time for your Mac to create that disk image and save it onto your hard drive.
Move the created Time Machine sparse bundle disk image file to your network share.
Tell your Mac where the new Time Machine image is stored
In the case of backing up to a network share, it’s not possible to select the Time Machine location the usual way (aka click here, select disk, save it, done). You need to fire up the Terminalapp and type in the following:
sudo tmutil setdestination /Volumes/Time\ Machine
If you named your backup file differently, make sure you update the above line. If you have spaces in your Time Machine’s name, put
\ before the space (as I did in my example above) or the command will fail.
After executing the command, the Terminal app will ask you to enter your password.
That should be it. You can verify your Time Machine is configured properly by going to its settings. It should look like this:
If your Mac is accessing the network share over WiFi, the first backup could take a while.
Your Mac will only continue backing up itself for as long as the Time Machine image is mounted. Once you reboot your Mac, the mounted drive will be gone.
You have two options: either keep mounting it manually each time your reboot or add the Time Machine sparse bundle disk image into your user account’s Login Items.
Note: You will need to ensure your network share is mapped to your Mac before you can mount the backup image. I solved both by adding my network share (NAS in the picture) and the bundle image to my account’s Login Items.
There’s one downside using that approach: your Mac will try to mount those even if you’re not on the network where your network share is, and it’ll bombard you with a few warnings before it gives up (as usual, there’s a fix for this too – do check the first comment underneath this article as well).
There you have it. Hope you find this post useful. You can share your thoughts in the comments below if you’d like.