This took me about 4 days to figure out, mainly because of poor documentation and finding the right firmware for my router and also due to me only being a Mac owner for about 8 months!
What you need:
Now I am going to assume you have found the necessary hardware and firmware as stated above, so let's begin.
First off you need to create a sparsebundle image. This is necessary for Time Machine to operate. The main HDD can be in any file format, so long as the router can read it, I have mine in EXT4 as it is the most compatible with my firmware.
You will need to use the HDUtil command, so open Terminal. I am going to give you the option of an unencrypted and encrypted without spotlight backup.
Encrypted Backup:
Type - cd desktop, then select and copy and paste the text below.
Unencrypted Backup:
Type - cd desktop, then select and copy and paste the text below.
Note -
900 = Size in GB, change as necessary.
Volname = Name of your sparsebundle ( you can name it what you like )
This will now create the aforementioned image on your desktop
Repartition your Sparsebundle:
You need to do this so it will work with Time Machine. To do this you need to right click the bundle and select open with Disk Utility. In the left hand side of the app you will see the newly mounted drive. Next do the following:
Phew! Almost there!!
Configure your Time Machine:
Enter the following code in Terminal
( replace the disk for your drive )
To verify this has worked type diskutil info disk1s2 ( again replace disk for yours )
Finally you need to set the destination drive
As before replace the name of the drive with yours.
Verify
Enabling on boot:
Open your User and Accounts in settings, click login items and drag your CIFS Timemachine drive to the window.
Success!! All you need do now is enable Time Machine and you are sorted!
*** Due to this post I must emphasise this is necessary if your router cannot use AFP ( Apple File Protocol ) and mount / read non HFS partitions.
---------------------------------------------------------------------------------------
Hardware used:
Netgear WNDR 3700V1
Gargoyle Firmware 1.59
WD MyBook 2.0 1TB
Macbook Pro Mid 2012.
What you need:
- A router with a usb
- A external HDD of at least 1tb ( can be smaller, but not ideal )
- A firmware capable of SMB / CIFS - I recommend the latest Gargoyle which is based on OpenWRT that I used for this guide.
- Time and patience!
Now I am going to assume you have found the necessary hardware and firmware as stated above, so let's begin.
First off you need to create a sparsebundle image. This is necessary for Time Machine to operate. The main HDD can be in any file format, so long as the router can read it, I have mine in EXT4 as it is the most compatible with my firmware.
You will need to use the HDUtil command, so open Terminal. I am going to give you the option of an unencrypted and encrypted without spotlight backup.
Encrypted Backup:
Type - cd desktop, then select and copy and paste the text below.
PHP:
hdiutil create -size 900g -type SPARSEBUNDLE -encryption AES-128 -nospotlight -volname “Macbook-Pro-Backup.sparsebundle” -fs “Case-sensitive Journaled HFS+” -verbose backup
Unencrypted Backup:
Type - cd desktop, then select and copy and paste the text below.
PHP:
hdiutil create -size 750g -type SPARSEBUNDLE -fs "HFS+J" Macbook-Pro-Backup.sparsebundle
Note -
900 = Size in GB, change as necessary.
Volname = Name of your sparsebundle ( you can name it what you like )
This will now create the aforementioned image on your desktop
Repartition your Sparsebundle:
You need to do this so it will work with Time Machine. To do this you need to right click the bundle and select open with Disk Utility. In the left hand side of the app you will see the newly mounted drive. Next do the following:
- Click partition in the main window
- Choose one partition in the partition layout section
- Name it CIFS Timemachine Backup
- Click apply
- In dialog box select partition to finalise.
- Quit the Disk Utility app.
Phew! Almost there!!
- Next navigate to you shared hdd
- Select your sparsebundle from the desktop and while holding down command, drag it to the share.
- Double click the sparsebundle to mount it
Configure your Time Machine:
- Now open Terminal again
- Type diskutil list
- Find the device identifier for your CIFS Timemachine Backup
Enter the following code in Terminal
PHP:
sudo diskutil enableOwnership dev/disk1s2
( replace the disk for your drive )
To verify this has worked type diskutil info disk1s2 ( again replace disk for yours )
Finally you need to set the destination drive
PHP:
sudo tmutil setdestination /Volumes/CIFS\ Timemachine\ Backup
As before replace the name of the drive with yours.
Verify
Code:
tmutil destinationinfo
Enabling on boot:
Open your User and Accounts in settings, click login items and drag your CIFS Timemachine drive to the window.
Success!! All you need do now is enable Time Machine and you are sorted!
*** Due to this post I must emphasise this is necessary if your router cannot use AFP ( Apple File Protocol ) and mount / read non HFS partitions.
---------------------------------------------------------------------------------------
Hardware used:
Netgear WNDR 3700V1
Gargoyle Firmware 1.59
WD MyBook 2.0 1TB
Macbook Pro Mid 2012.
Last edited: