Guide - Using external HDD via router as Time Machine with Mountain Lion

Discussion in 'OS X Mountain Lion (10.8)' started by Risco, Jan 22, 2013.

  1. Risco, Jan 22, 2013
    Last edited: Jan 22, 2013

    Risco macrumors 68000


    Jul 22, 2010
    United Kingdom
    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:

    1. A router with a usb
    2. A external HDD of at least 1tb ( can be smaller, but not ideal )
    3. A firmware capable of SMB / CIFS - I recommend the latest Gargoyle which is based on OpenWRT that I used for this guide.
    4. 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:

    1. Click partition in the main window
    2. Choose one partition in the partition layout section
    3. Name it CIFS Timemachine Backup
    4. Click apply
    5. In dialog box select partition to finalise.
    6. Quit the Disk Utility app.

    Phew! Almost there!! :D

    1. Next navigate to you shared hdd
    2. Select your sparsebundle from the desktop and while holding down command, drag it to the share.
    3. Double click the sparsebundle to mount it

    Configure your Time Machine:

    1. Now open Terminal again
    2. Type diskutil list
    3. 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/CIFSTimemachineBackup
    As before replace the name of the drive with yours.


    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 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.
  2. ConCat macrumors 6502a


    Jul 27, 2012
    In an ethereal plane of existence.
    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.
  3. Risco thread starter macrumors 68000


    Jul 22, 2010
    United Kingdom
    No it does not when connecting via SMB or CIFS via a ROUTER, try it ;)
  4. talmy macrumors 601


    Oct 26, 2009
    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.
  5. ConCat macrumors 6502a


    Jul 27, 2012
    In an ethereal plane of existence.
    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.
  6. Risco thread starter macrumors 68000


    Jul 22, 2010
    United Kingdom
    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.
  7. vahidia macrumors newbie

    Aug 17, 2013
    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),
    2-macbook pro15,mid 2012,mountain lion
    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:

    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) ?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...
  8. satcomer macrumors 603


    Feb 19, 2008
    The Finger Lakes Region
  9. PJL500 macrumors regular

    Nov 27, 2011
    HDD interchangeable between router and MBP?

    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?
  10. Weaselboy Moderator


    Staff Member

    Jan 23, 2005
    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.
  11. Risco thread starter macrumors 68000


    Jul 22, 2010
    United Kingdom

    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.

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


    Staff Member

    Jan 23, 2005
    That won't work. See info below from here.

  13. ismaelgokufox macrumors newbie


    Aug 13, 2015
    Will it not work doing the time machine destination step again after mounting the sparse locally on the Mac?
  14. Weaselboy Moderator


    Staff Member

    Jan 23, 2005
    No it won't. It will want to make the backup in its own, new Backups.backupdb file. What you could do is open the sparse bundle file and move the Backups.backupdb file to make a local TM backup. But it would be time consuming and not something you would want to be doing over and over to go back and forth between local and networked backup.
  15. ismaelgokufox macrumors newbie


    Aug 13, 2015
    Good to know! Thanks. I'm dealing with this right now. Have a MacBook backedup on my Mac mini via external disk. Think will leave it like that. ;)

Share This Page