HOW TO: Setup Time machine to work on a NAS

Discussion in 'macOS' started by FullGaz, Feb 21, 2008.

  1. FullGaz macrumors member

    Joined:
    Nov 1, 2007
    #1
    I've just got my iMac so for me it was important to get TM up and running before I start doing some real work (and hard play!).
    I want to share the lessons learned from my experience and from others in this forum in the hope that it will help others.

    I am using a NS4300N NAS from Promise on a LAN with an iMac running Leopard 10.5.2. I connect to it using SMB. It should work with any NAS since the instructions here are not NAS specific. I haven't tried with AFP.

    Here we go:

    First, on the NAS:

    1. Login to your NAS and setup a new shared folder, I called mine TMBACKUP.
    2. Setup a new user called the same as the shared folder. I called mine TMBACKUP as well. The reason I did that is that when I called my user differently (it was tmuser) then the Finder would show me a new non existing mountpoint called like tmuser! I don't know if it's an Apple bug or a problem with my NAS. At this point you can setup a quota for this new user (but see note at the end)
    3. Assign RW privileges to the user to the TMBACKUP folder

    Then, on the Mac:

    1. Apply the hack 'defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1' as described in this forum.
    2. This is where it's got to be done properly: in Finder, select Go>Connect to Server. For the server address, type smb://tmbackup@MY_NAS_IP_OR_DNS/TMBACKUP. Click Connect. When prompted, enter the password and save in your keychain.
    3. Check that you're connected with the right user (not yourself) or the quotas might not be applied! Here's how to do it: copy a (large, 100M or so) file to the TMBACKUP sharepoint. Go to your DS and check the user's usage. If it's gone up by about 100M then you know that you Mac is connected to TMBACKUP with that user. Get that right before going further. It's worth double checking.
    4. Open Disk Utility and create a new image with the following attributes:
      • Location: your home directory
      • Save As: your computer name, underscore, mac address. For instance: "Joe Smith's iMac_0012aabbcc34"
      • Volume Size: I used 250G, under the 300G quota assigned to the user. It won't take 250G in your home directory, feel free to use as much space as you want, but less than what is assigned to the user on the NAS.
      • Image Format: sparse bundle disk image.
      • You may want to create an encrypted image, but I haven't tried so I don't know if it works... It should, right?
      • Click Create and quite Disk Utility.
    5. Copy the created disk image to the TMBACKUP directory on the NAS.
    6. Go to TM, select your TMBACKUP share and enable backups. Backup will start within a couple of minutes or when you click Start Backing Up in the menu bar icon.
    7. Create an automator Application that connects to your shares first then to the TMBACKUP share. Place this application in the Login Items of your account. For some reason, it didn't work when I used a workflow or a plugin, even though I had associated them with the Automator Runner... BTW, is it just me or is Automator full of bugs???

    Et voila! That worked for me, the first backup went really well: < 2 hours for the first 30G or so, I can browse the backups using the interface and recover deleted (on purpose) files.

    However, there are still a few unanswered questions, but with experience I'm hoping to be able to answer them. For instance, is this quota thing really necessary? Since the sparse image is limited in space, TM should be able to manage the space used by itself, without the need for quota. If quotas are not necessary then of course the procedure is even simpler: no need for a separate user or separate shared folder. Second, what happens, really, when the sparse image becomes full? That's a bit like the quota question. Some say that the image gets deleted, some say that it doesn't... We'll have to wait and see. I might test it later when I install Leo on my MBP.

    Feedback appreciated.
     
  2. dvd macrumors regular

    dvd

    Joined:
    Oct 12, 2007
    Location:
    Massachusetts
    #2
    Good instructions.

    No need for quotas, like you said, your max sparse bundle size will be your upper limit of disk usage. But you will need some userid to authenticate on your NAS/remote-server.

    You running 10.5.2? These steps work great for 10.5.2. Previously you could create the sparse bundle directly on the remote disk but that functionality appears to have broken with the update. Having to create the bundle locally and move it over is a recent deal.

    I've been running this way for a long time but haven't managed to fill my sparse image yet, so I can't comment on the rumors that things go haywire when it fills.

    Thanks!
     
  3. natn22 macrumors newbie

    Joined:
    Mar 16, 2008
    #3
    awesome! but i need help!!

    hi - thank you for these very detailed instructions. i really tried to follow them to the letter but i have a few Q's because i'm not really sure if i am set up correctly or not. i have recently bought a QNAP ts209 (my NAS, which is an 'unsupported' drive) and upgraded to Leopard so hoping to take advantage of this fab new thing called time machine. However, I am sooooo out of my depth with all this networking stuff! Any guidance would be MUCH appreciated...

    ok, so i got time machine to recognise my NAS. my queston:

    1) How do i do check i'm connected as the right user? And what does 'go to your DS mean?' Not sure how to check usage.

    2) when i click on all the folders in my NAS they all say the same for 'available storage' even though i tried to put the quota thing on the backup folder.

    3) didnt understand this step at all - "Create an automator Application that connects to your shares first then to the TMBACKUP share..." can you help?

    4) how do i know its all working properly?

    i've just had the NAS for about a month and its given me NOOOO love. I was almost going to return it because of the TM machine factor until i saw these threads! so any help would be much appreciated.
     
  4. MamaWildBear macrumors newbie

    Joined:
    Mar 16, 2008
    #4
    All of the above are specific to your NAS. It looks like you have a different brand than the first poster so your procedures will be different. You should check your user manual. For example, I have an HPMediaVault and it does not support quotas so that stuff doesn't apply to me. Instead, I created a dedicated volume for each Mac I plan to back up so that it will be limited by the partition size if not by the size of the sparse bundle itself.

    That's the problem I have on my HP as well. All folders within a single volume show total availability for that volume. That's why I had to create a dedicated volume, especially since you can't configure Time Machine to dump old data after a certain amount of time, only when disk space is used up. I could forsee TM gobbling up all the space on my NAS.

    Automator is an application on the Mac that can create what are essentially automated scripts by dragging and dropping actions and then saving it as an application. Search spotlight for Automator and you'll see it. I found it to be a little flaky and ended up writing a script to do the same thing. See below - you have to change the folder names and NAS share names to match your set up. Search spotlight for "Script Editor" for the application to paste this code into. Make the necessary changes, click the "Compile" button then save it as an application.


    tell application "Finder"
    set the sharelist to {"Backup", "FileShare", "MediaShare"}

    try
    repeat with thecurrentvalue in sharelist
    mount volume "SMB://hpmediavault/" & thecurrentvalue
    end repeat
    on error
    display dialog "There was an error mounting the Volume." & return & return & ¬
    "The server may be unavailable at this time." & return & return & ¬
    "Please inform the Network Administrator if the problem continues." buttons {"Okay"} default button 1
    end try
    end tell​

    Time Machine will tell you if the backup failed. Also, have it do an immediate backup and a window should show you a file copy progress. After it completes a backup, you should be able to enter Time Machine as if you were going to do a restore and browse through files.

    I'm just now running through my first backup as I got a new Mac and couldn't figure out why this one couldn't backup to the NAS. Thanks for pointing out the issue. I thought it was because I was trying to back up to a network share smaller than my hard drive. I almost gave up when I found this site and thought "duh!!!" Once I had the key, it was a piece of cake. As with the others, I'll find out what happens when that sparse bundle gets full. I'm hoping that it will behave properly and start dumping older backup sessions. If my hard drive gets full enough though, I would expect it to freak out as there won't be enough space for a full current backup. Hope it doesn't get that way - I exclude some of the larger, unimportant stuff that can be easily replaced.
     
  5. chinarider macrumors regular

    Joined:
    Jan 7, 2008
    #5
    Has anyone else gotten this to work with these instructions? I have tried it twice but the backup still fails after "preparing"

    Tom
     
  6. cjohnsoia macrumors newbie

    Joined:
    Mar 26, 2008
    #6
    I, too, have followed these instructions to the letter and am unable to get this working.

    I am using an external drive shared via smb and have been thinking this may have been a perms issue? I have opened up the perms of the file system to 777 and have enabled write access to anyone in smb.conf.

    Can those of you who may have got this working please post your smb.conf file. I think this should work...but...perhaps I have some setting in smb that is causing TM to fail with the error:

    TM failed: Could not create disk image.

    Thanks in advance
     
  7. cjohnsoia macrumors newbie

    Joined:
    Mar 26, 2008
    #7
    Resolved:

    In my case I needed to create the disk image without a partition map and a name that was "AL CAPS_COMPUTERNAME_macaddressofen0"

    That is to say that:
    1) The image name had to be all caps computer name underscore mac
    address of "en0"
    2) The image had to be created HFSPlus
    3) The image had to be create without a partition map
    4) The image had to be a "sparse bundled disk image"
    5) The image had to be created locally and copied over to the share
    6) Obvious - but the share had to be writable for the given user

    Once the image was created properly everything worked.

    Thanks for the posts all - they allowed me to get this up and running.
     
  8. adamcr macrumors newbie

    Joined:
    Feb 20, 2006
    #8
    I've got Time Machine working to an SMB share on a QNAP NAS box. It was much easier to set up on 10.5.1, but 10.5.2 made it harder to create the initial sparse bundle.

    I got round the problem by using an AFP share on another Mac and using Time Machine itself to create an initial sparse bundle. There's a trick to ensure the initial backup only takes a few minutes -- exclude everything apart from an empty disk image.

    Cheers,

    Adam
     
  9. slayher macrumors newbie

    Joined:
    Mar 31, 2008
    Location:
    SC
    #9
    Thanks!

    Just wanted to say thanks for this thread. I got TM working with my Western Digital My Book World Edition.
    The only trouble I had was I used the Mac Address for my wireless NIC vice the Wired. Once I renamed the sparse to the correct Mac it was an all go.

    I also had to jump through hoops to get my MAC to write files to the NAS.

    Thanks again!
    Tony
     
  10. natn22 macrumors newbie

    Joined:
    Mar 16, 2008
    #10
    hi, i'm using a QNAP NAS too and am having trouble with the time machine setup. after i thought i had it working, time machine then encountered issues saying the NAS was full - only after 2 days. And there was about 280G before i had time machine running on it. this was after i thought i had put a quote of about 100G for the time machine backups.

    maybe i did it wrong? how do i check? does anyone know what settings i may need to adjust?

    thanks,
    natalie
     
  11. rhett7660 macrumors G4

    rhett7660

    Joined:
    Jan 9, 2008
    Location:
    Sunny, Southern California
    #11
    Thank you for the detailed instructions on setting this up. Just what I was looking for!
     
  12. SisterRay macrumors regular

    Joined:
    May 25, 2006
    Location:
    UK
    #12
    Hi,

    Can someone help. I am trying to get this to work with an Iomega Home Network Hard Drive.

    I can get as far as copying the sparse bundle file to the share, but it always fails to copy (Error Code - 1407). The disk is formatted to FAT32 and I cannot change it as the networking will stop working.

    Can you give me explicit instructions on how to copy the file over successfully. I can copy other files across OK, so I have permissions to write to the networked file system

    Please help!
     
  13. SisterRay macrumors regular

    Joined:
    May 25, 2006
    Location:
    UK
    #13
    I think I'm getting closer.

    I have found that by creating the sparsebundle file using a short name e.g. 6 characters. Also I had to use lowercase chars.

    I could then copy this to the share.

    I then renamed it to <hostname>_<MacAddressofEn0>.sparsebundle

    This worked!!!

    However the timemachine backup still fails with the message

    The backup disk image could not be mounted

    Any ideas?
     
  14. SisterRay macrumors regular

    Joined:
    May 25, 2006
    Location:
    UK
    #14
    Here is my log when trying to run time machine. I have changed the name of my sparse bundle in the log.

    Any ideas?

    May 27 23:24:57 mccool /System/Library/CoreServices/backupd[487]: Backup requested by user
    May 27 23:24:57 mccool /System/Library/CoreServices/backupd[487]: Starting standard backup
    May 27 23:24:57 mccool /System/Library/CoreServices/backupd[487]: Mounting disk image /Volumes/PUBLIC/XXXXXX_0016cbXXXXXX.sparsebundle
    May 27 23:24:58 mccool /System/Library/CoreServices/backupd[487]: Failed to attach to disk image, returned: 109
    May 27 23:24:58 mccool /System/Library/CoreServices/backupd[487]: Failed to mount disk image /Volumes/PUBLIC/XXXXXX_0016cbXXXXXX..sparsebundle
    May 27 23:24:58 mccool /System/Library/CoreServices/backupd[487]: Backup failed with error: 21
     
  15. VideoFreek macrumors 6502

    VideoFreek

    Joined:
    May 12, 2007
    Location:
    Philly
    #15
    This is a useful thread. Just for the record, here is a thread at the ReadyNAS forum with links to how to do this with a Netgear/ Infrant ReadyNAS.
     
  16. jsbarone macrumors regular

    Joined:
    May 8, 2007
    #16
    I've been trying to backup to my SMB Nas for months now. Still no luck---tried everything in this thread. I can't even copy the sparse bundle to the NAS drive---it only makes it about half way.
     
  17. SisterRay macrumors regular

    Joined:
    May 25, 2006
    Location:
    UK
    #17
    I found that you have to change your computer name to something with 6 lowercase characters so the local sparsebundle is called xxxxxx.sparsebundle. I then use the command in terminal to copy it to the network location

    rsync -avE source target

    I then change directory and use the following to rename the file on the network location

    mv xxxxxx.sparsebundle xxxxxx_<macaddressen0>.sparsebundle


    This seems to work, but then I cannot mount the image

    I have encountered a whole set of new issues since 10.5.3
     
  18. Foxile macrumors regular

    Joined:
    Dec 27, 2007
    #18
    I was hoping 10.5.3 was going to address this, so it'd work without 'hacking'.

    Whatever I do, TM fails to work on my Thecus N4100+ and just 'creates' another virtual volume, so I end up with Time Machine and Time Machine(1) etc etc
     
  19. SisterRay macrumors regular

    Joined:
    May 25, 2006
    Location:
    UK
    #19
    I gave up and partitioned my Iomega network drive. It means I can only use time machine when connected via USB.
     
  20. cdembek macrumors regular

    Joined:
    May 14, 2008
    #20
    I have read about 10 threads now where folks provide a great step by step guide for connecting a WD My Book World Edition. However I have yet to have time machine make a backup.


    UPDATE... I got it to work!!!

    Followed these instructions http://www.macosxhints.com/article.php?story=20080420211034137

    http://support.apple.com/kb/TS1329

    read thru all the post at the bottom of the page... my mac address was different than what my mac stated

    I am going to write up a guide with screen shots
     
  21. monstrorwrtj macrumors newbie

    Joined:
    Sep 21, 2009
    #21

Share This Page