PDA

View Full Version : Guide - Using external HDD via router as Time Machine with Mountain Lion




Risco
Jan 22, 2013, 12:23 PM
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! :eek:

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.

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.

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!! :D


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

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


sudo tmutil setdestination /Volumes/CIFS\ Timemachine\ Backup

As before replace the name of the drive with yours.

Verify

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! :D

*** Due to this post (http://forums.macrumors.com/showpost.php?p=16707482&postcount=2) 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.



ConCat
Jan 22, 2013, 04:51 PM
What? All you do is mount the disk on your desktop and select it as your Time Machine location... I don't get this.

Time Machine takes care of making the sparsebundle by itself, with no assistance.

Risco
Jan 22, 2013, 04:56 PM
What? All you do is mount the disk on your desktop and select it as your Time Machine location... I don't get this.

Time Machine takes care of making the sparsebundle by itself, with no assistance.

No it does not when connecting via SMB or CIFS via a ROUTER, try it ;)

talmy
Jan 22, 2013, 04:58 PM
What? All you do is mount the disk on your desktop and select it as your Time Machine location... I don't get this.

Time Machine takes care of making the sparsebundle by itself, with no assistance.

Generally only true if you are using 100% Apple boxes. He's putting the external drive on his router. I had to go through similar hoops when I used a Windows PC for my TimeMachine backups.

ConCat
Jan 22, 2013, 05:05 PM
No it does not when connecting via SMB or CIFS via a ROUTER, try it ;)

Hmm, it would seem I never tried SMB on my Airport Extreme. It indeed doesn't seem to want to notice that there's an SMB share mounted. Strange.

Risco
Jan 22, 2013, 05:08 PM
Generally only true if you are using 100% Apple boxes. He's putting the external drive on his router. I had to go through similar hoops when I used a Windows PC for my TimeMachine backups.

Yup that is exactly right. I had an external USB drive that worked perfectly, but it meant I had to plug it in. I had all the hardware necessary for a Time Machine, just it was not made by Apple. However the firmware on my Netgear 3700 is very flaky. I therefore had to search for an alternative firmwares, unfortunately none of them have very good support for HFS or AFP. Hence I needed to run EXT4 in the end, which of course is not readable by Time Machine and I cannot auto create a sparse bundle.

vahidia
Aug 17, 2013, 05:40 AM
Hi Risco,

at first I want to express my gratitude about ur extremely useful post. :rolleyes:

This is what I have::cool:
1-modem (Linksys WAG54G2 (http://support.linksys.com/en-us/support/gateways/WAG54G2)),
2-macbook pro15,mid 2012,mountain lion
3-iPhone5
4-PC laptop
5-Galaxy S4(my roommate)
6-external HDD (WD my passport - 1TB-usb3)
7-external HDD (WD my book -1TB-usb2)
8-SAMSUNG 40'' TV

I want to have a shared external HDD in order to:
1- backup from my MBP using Time machine WIRELESSLY. like what you've done. ( airport extreme and Time capsule is really expensive 4 me)
2- stream movie and music from the shared HDD through my MBP,iPhone,iPad,PC, and samsung S4 then show it on TV by apple TV.

what should I do??::(
I suppose I should buy:
1-Apple TV 3rd gen.:apple:
2-router

Now these are my question::confused::confused:

1-firstly, is it possible to have this network?

2-which kind of router should I buy?(I mean which brand, I prefer to buy DLINK one,coz it can be found easily here in my town.however I want you to introduce me others such as Linksys too.)
how about this one (D-Link DNS-313 NAS Box (http://www.trustedreviews.com/d-link-dns-313-nas-box_Peripheral_review)) ?would be work better than a router for me?

3- considering to my HDDs and the router which I'd buy,
3-1-what would be the speed of writing and reading??
3-2-would be very slow?
3-3-would be tolerable?
3-4- would be as high as I can stream movie and music to Apple TV and backup by time machine?
3-5-How about your speed now?

4-What format my HDD,which let me to control it from my variety devices (iDevices,MBP,PC,S4), should be had?

actually, I'm new in Apple ecosystem and really weak in the network things,so I'd be appreciated if you answer my question in a simple way:p:p

sorry for my banal question, and really sorry for my awful english writing.
thank you sir...

satcomer
Aug 17, 2013, 10:21 AM
I known about something like this since last year because of the blog page Configuring OS X Mountain Lion Time Machine to Work With CIFS (SMB) Share (http://rajiv.sg/blog/2012/11/19/configuring-os-x-mountain-lion-time-machine-to-work-with-cifs-smb-share/). It even has videos explaining every step.

PJL500
Aug 22, 2013, 12:04 PM
After following these instructions and having success with the setup can the HDD be connected straight to USB on the MBP for backup?

Is it interchangeable if I want to travel and connect the TM HDD directly to the MBP and back to the router again when I arrive home?

Weaselboy
Aug 22, 2013, 02:29 PM
After following these instructions and having success with the setup can the HDD be connected straight to USB on the MBP for backup?

Is it interchangeable if I want to travel and connect the TM HDD directly to the MBP and back to the router again when I arrive home?

Nope... won't work. The networked TM backups create a sparse bundle image containing the backup and the local, USB backups use a regular file format.

Risco
Aug 22, 2013, 02:37 PM
Hi Risco,

at first I want to express my gratitude about ur extremely useful post. :rolleyes:

This is what I have::cool:
1-modem (Linksys WAG54G2 (http://support.linksys.com/en-us/support/gateways/WAG54G2)),
2-macbook pro15,mid 2012,mountain lion
3-iPhone5
4-PC laptop
5-Galaxy S4(my roommate)
6-external HDD (WD my passport - 1TB-usb3)
7-external HDD (WD my book -1TB-usb2)
8-SAMSUNG 40'' TV

I want to have a shared external HDD in order to:
1- backup from my MBP using Time machine WIRELESSLY. like what you've done. ( airport extreme and Time capsule is really expensive 4 me)
2- stream movie and music from the shared HDD through my MBP,iPhone,iPad,PC, and samsung S4 then show it on TV by apple TV.

what should I do??::(
I suppose I should buy:
1-Apple TV 3rd gen.:apple:
2-router

Now these are my question::confused::confused:

1-firstly, is it possible to have this network?

2-which kind of router should I buy?(I mean which brand, I prefer to buy DLINK one,coz it can be found easily here in my town.however I want you to introduce me others such as Linksys too.)
how about this one (D-Link DNS-313 NAS Box (http://www.trustedreviews.com/d-link-dns-313-nas-box_Peripheral_review)) ?would be work better than a router for me?

3- considering to my HDDs and the router which I'd buy,
3-1-what would be the speed of writing and reading??
3-2-would be very slow?
3-3-would be tolerable?
3-4- would be as high as I can stream movie and music to Apple TV and backup by time machine?
3-5-How about your speed now?

4-What format my HDD,which let me to control it from my variety devices (iDevices,MBP,PC,S4), should be had?

actually, I'm new in Apple ecosystem and really weak in the network things,so I'd be appreciated if you answer my question in a simple way:p:p

sorry for my banal question, and really sorry for my awful english writing.
thank you sir...



Ok well I will try to answer your questions:

I recommend Netgear routers, as they are reliable and will take custom firmwares.
It should be wireless N with 300mbps speed or faster.

I have actually decided not to go this route as my media library is very large now. So instead I have my external USB 2 drive connected via usb to the router and my USB 3 drive as my time machine that I plug in periodically.

Due to overheads and poor drivers, I was getting around 5mb/s write speeds which is too slow for Time machine imo but fast enough to use as a media streamer. So while this guide is right and it works, in the end I decided a different path.

This is my setup now

WNDR 3700
USB 1tb Drive used to store iTunes folder.
Macbook servers as iTunes media server to Apple TV
USB 3.0 1TB drive as Time Machine.

You have practically the same setup as me, except your router needs upgrading. Some of the Netgear routers support Time Machine out of the box.

After following these instructions and having success with the setup can the HDD be connected straight to USB on the MBP for backup?

Is it interchangeable if I want to travel and connect the TM HDD directly to the MBP and back to the router again when I arrive home?

I see no reason why not, although you would have to reconfigure the Time Machine to the USB port.

Weaselboy
Aug 22, 2013, 07:03 PM
I see no reason why not, although you would have to reconfigure the Time Machine to the USB port.

That won't work. See info below from here (http://pondini.org/TM/18.html).

http://imgur.com/gDsNYrt.png