This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[HOWTO]Time Machine setup for OS X 10.8.x

Only Admin's or Moderators can move thread's to this sub-forum.
Nobody should start a new thread on this sub-forum.
Anybody can reply to a thread on this sub-forum.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
seaside
Starter
Starter
Posts: 15
Joined: 20 Nov 2012 18:20
Status: Offline

[HOWTO]Time Machine setup for OS X 10.8.x

Post by seaside »

Hi *,

I'm new to NAS4Free and to this forum so bear with me.
This post may likely be moved to a more appropriate place like AFP, Backup or the How-to section.

In the last few days I struggled to get NAS4Free being accepted as a time machine backup target by OS X 10.8.x. Marking an AFP share as a Time Machine drive didn't work reliable for me. Either the drive didn't show up or other shares vanished after AFP restart. Renaming the time machine share sometimes caused it to pop up again or not.

Trying

Code: Select all

dns-sd -Z _adisk local
on the OS X side I noticed that some of the AFP shares were not always announced by bonjour.

Checking on the NAS using

Code: Select all

cat /var/etc/mdnsresponder.conf
showed that all shares were listed for announcement but the info didn't make it through obviously.

The following how-to describes all the steps necessary to use NAS4Free as a time machine backup target. As a bonus you can restrict the size of your Time Machine backup so it doesn't entirely fill up your disk.

Prepare user and group

We use a special user for Time Machine backups so the backup is nicely separated from the other data on the disks.
  1. Log in to your NAS using the web gui
  2. create a new group timemachine
  3. Create a user timemachine
  4. Make timemachine the default group for the timemachine user
Leave the home dir alone for now. We will add that later on. There is no need to give that user a login shell so leave nologin.


Prepare Time Machine directory

The following is best done on the console or over ssh. Log in as root. It is assumed your disk is called data in the examples.


Create a directory on your data disk named TMBackup (or whatever you like):

Code: Select all

mkdir /mnt/data/TMBackup
Make user timemachine the owner of the newly created directory:

Code: Select all

chown timemachine:timemachine /mnt/data/TMBackup
Set Access rights:

Code: Select all

chmod 1775 /mnt/data/TMBackup
I only use encrypted time machine backups so it's safe for me to allow everyone to read and browse the directory (and I'm the only user anyway). If you have concerns about that use 1770 instead. I didn't test that but should work.


Create the Time Machine share

AFP shares are announced using Bonjour (Apples name for zeroconf) by NAS4Free when Automatic disk discovery is marked on the shares details page.

Don't let NAS4Free announce your Time Machine shares!

In fact don't tell NAS4Free anything about the Time Machine directory. We will use another means to publish the share.

Go to the users and groups page of the gui and add the directory /mnt/data/TMBackup/ as the home directory for user timemachine we created earlier.

Create the file /mnt/data/TMBackup/AppleVolumes with the following contents:

Code: Select all

"/mnt/data/TMBackup/" "Time Machine" volcharset:UTF8 options:usedots,upriv,tm volsizelimit:800000
Change group:

Code: Select all

chown :timemachine /mnt/data/TMBackup/AppleVolumes
On login of user timemachine this file will be read by the AFP daemon and the share Time Machine made available.

Note options:usedots,upriv,tm which tells the AFP daemon that this share is a Time Machine target.

Using volsizelimit:800000 we restrict the size of the backup to 800GB. Chose whatever is suitable for you.


Announcing the Time Machine target using Bonjour

Up to now the new share Time Machine is not visible in Time Machine on the client. This will change now.

Create the file /mnt/data/TMBackup/tm_mdnsresponder.conf with the following contents:

Code: Select all

Rewind Time
_device-info._tcp. local.
1
model=AirPort

Rewind Time
_adisk._tcp. local.
9
sys=waMA=0
dk0=adVF=0xa1,adVN=Time Machine

Change group:

Code: Select all

chown :timemachine /mnt/data/TMBackup/tm_mdnsresponder.conf
Create the file /mnt/data/TMBackup/addtmdisk.sh with the following contents:

Code: Select all

#! /bin/bash

#kill all running mDNSResponderPosix instances
killall -INT mDNSResponderPosix

#Start new ones. Make sure our time machine announce is the first to be launched
/usr/local/bin/mDNSResponderPosix -b -f /mnt/data/TMBackup/tm_mdnsresponder.conf
/usr/local/bin/mDNSResponderPosix -b -f /var/etc/mdnsresponder.conf
Change group:

Code: Select all

chown :timemachine /mnt/data/TMBackup/addtmdisk.sh
Make it executable:

Code: Select all

chmod 774 /mnt/data/TMBackup/addtmdisk.sh
Go to the gui and select System->Advanced->Command Scripts

Create a new postinit script with command:

Code: Select all

/mnt/data/TMBackup/addtmdisk.sh 
Create a new shutdown script with command:

Code: Select all

killall -INT mDNSResponderPosix ; rm /var/run/mDNSResponder.pid
On page Services->AFP enable the AFP daemon.

Reboot your NAS.

Select your share in TM preferences on the client

After your NAS rebooted you should see two devices in the Shared section of your Finder sidebar:
  • Your NAS server with a nice XServe icon as before
  • A new device named Rewind Time
Opening the Time Machine preferences you're able to select the new disk Time Machine on device Rewind Time as a
backup target. After selection a login window pops up for the share Time Machine. Login as user timemachine (the
one you created in the beginning).
OS X stores the login credentials in your system keychain. You don't have to reenter them on each backup.


Roundup

This setup works for me for some days now. Each hour the share is mounted and a backup performed. Shutting down the
NAS in between is no problem.

Being logged in to the NAS with your normal user login is possible while Time Machine works in the background on your
backup.

You may skip the following if you don't care about the technical background.

What do these scripts and commands do?

File tm_mdnsresponder.conf

This is the configuration file for the additional mDNSResponderPosix daemon we start in the addtmdisks.dh script.
  • The first section tells the OS X clients that a new device is around.

    Code: Select all

    Rewind Time
    _device-info._tcp. local.
    1
    model=AirPort
    
    This causes the Rewind Time device to show up in the sidebar with it's own icon. You may chose a name to your liking here. The line model=AirPort tells OS X which icon to show in the sidebar. According to [1] you may use one of the following:
    • RackMac (same as Xserve)
    • PowerBook
    • PowerMac
    • Macmini
    • iMac
    • MacBook
    • MacBookPro
    • MacBookAir
    • MacPro
    • AppleTV1,1
    • AirPort
    If you leave out the device-info section OS X will show the default icon for connected servers.
  • The second section announces the share.

    Code: Select all

    Rewind Time
    _adisk._tcp. local.
    9
    sys=waMA=0
    dk0=adVF=0xa1,adVN=Time Machine
    
    Use the same name as in the first section so in the Time Machine preferences you can see that this share is on device Rewind Time.

More will be added later...

Here are some links you may find interesting wrt Time Machine and non Apple blessed hardware:

[1] http://kremalicious.com/ubuntu-as-mac-f ... ne-volume/
[2] http://the.taoofmac.com/space/HOWTO/Setup/Rendezvous
[3] https://developer.apple.com/library/mac ... ments.html

Edits
24.11.2012: Typo and formatting corrections. Added some technical explanation.
Last edited by seaside on 24 Nov 2012 14:45, edited 1 time in total.

pauler
NewUser
NewUser
Posts: 1
Joined: 23 Nov 2012 02:38
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by pauler »

my one works fine it all works just right how i want it to be

marcusman
NewUser
NewUser
Posts: 5
Joined: 20 Nov 2012 19:01
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by marcusman »

Nice post. I think I'll try it out later this week, as I've had a little trouble w/Time machine. I'm also new to NAS4free so I could be doing something wrong.
Have you had any issues in restoring files with TimeMachine using NAS4free?
Looking forward to your next post.

seaside
Starter
Starter
Posts: 15
Joined: 20 Nov 2012 18:20
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by seaside »

marcusman wrote: Have you had any issues in restoring files with TimeMachine using NAS4free?
Looking forward to your next post.
Well, I didn't try a full recovery because I use Time Machine for my documents only.

What I can say is that backups seem to work so far. I can travel back in time and restore files I deleted on my system. The drive holds time stamped folders with data for every backup as you would expect. I just tried to restore a deleted iPhoto item and that did work, too.

In general this hint doesn't tweak anything within Time Machine so as long as Time Machine is able to find and mount the backup drive everything should be just fine. You may check in the preferences if TM created a backup within the last hour.

As a general rule be sure to have another backup somewhere else for example on an external USB drive. You know your NAS may die like every other HD...

Regards

acolytex
NewUser
NewUser
Posts: 3
Joined: 07 Jan 2013 18:21
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by acolytex »

@seaside-

Thanks very much for the detailed post. I am wondering if you have any Mac OS X 10.7 (Lion) servers or clients accessing the safe AFP based share? I am planning to use 10.7 from multiple client and server locations to create TM based files.

Again, thanks!

rinoskovich
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by rinoskovich »

Seems to be working! Thanks!

acolytex
NewUser
NewUser
Posts: 3
Joined: 07 Jan 2013 18:21
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by acolytex »

@ seaside-

Again, thanks for the write up and the method. I have attempted to follow the methods you provide and create two different shares; one for each of two different clients. Do you have any suggestions for a method of scripting in the postinit phase to allow user timemachine and user tmmbp to each call a separate addtmdisk.sh that does not
#kill all running mDNSResponderPosix instances?

Again, thanks.

acolytex
NewUser
NewUser
Posts: 3
Joined: 07 Jan 2013 18:21
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by acolytex »

@seaside-

Again, thank you. In my setup, I chose to use a different backup user for each of two different client machines. This allowed both machines to run Time Machine backups to the NAS4Free server simultaneously, as each user was set to use a different AppleVolume and home directory.

techie
NewUser
NewUser
Posts: 1
Joined: 27 Jan 2013 04:23
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by techie »

Thank you, seaside, for an excellent and easy to follow how-to. I'm looking forward to the additional explanatory information you promised.

As an utter NAS4Free newbie I somehow managed to miss that all this needed to be done on an existing mount point created from within the NAS4Free GUI. With my embedded install, the script and config files vanished along with the directories I created as soon as I rebooted. It didn't take long to figure out the problem and the solution.

It seems regrettable that the configuration is being stored on the data disk and not on the boot volume, but I imagine the solution would take some real work, which would be lost the next time Apple "improves" its protocols.

yakkers
NewUser
NewUser
Posts: 1
Joined: 26 Feb 2013 21:30
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by yakkers »

I am trying to get this to work for me but Time Machine on my MAC gives up every time. It says "Time Machine couldn't complete the backup to <my NAS server name>. The backup disk is not available." This is after the 120 second count down. Time machine has previously accept my login on the 'Select disk' window.

I have noticed that on the NAS server there is no file '/var/etc/mndsresponder.conf'
Also I have only one 'mdnsresponder' process running on the NAS server from what I can tell.

I have tried this twice, the second time after a 'reset to factory defaults' on the NAS server and with no other NAS services configured.

I am new to Apple MAC, NAS4free and freeBSD so could do with some advice, thanks.

fireheadman
NewUser
NewUser
Posts: 3
Joined: 13 Mar 2013 04:15
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by fireheadman »

When I follow your steps.... I see only the Time Machine "Rewind Time" disk in the TM Preferences....
When I select it, I get the prompt to supply credentials...

After I hit return, I get the following error

Image

NOTE, my hostname is just "pyro", so not sure where the ".local" is coming from....

fireheadman
NewUser
NewUser
Posts: 3
Joined: 13 Mar 2013 04:15
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by fireheadman »

more like dead forum... makes ya wonder how many people really use nas4free these days....

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by raulfg3 »

The problem is not a "dead forum" is that you ask about a very specific question, and only others users that use OS X can answer ( Sorry I use win7).
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

fireheadman
NewUser
NewUser
Posts: 3
Joined: 13 Mar 2013 04:15
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by fireheadman »

Much better explanation and extremely SIMPLE to implement.
Did not have to jump through the hoops above.
This link explains it... http://thegeek.mobi/viewtopic.php?f=9&t=6

This link shows it in action... http://www.youtube.com/watch?v=hX3Ghwq4ctM

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by raulfg3 »

hope that finally you find a sollution, and thanks to share to us.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

pakpenyo
NewUser
NewUser
Posts: 6
Joined: 01 Nov 2013 12:00
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by pakpenyo »

Thanks seaside. This work for me with new 10.9 Mavericks but i'm not using as Time Machine backup. I'm only need to displaying my AFP in the Sidebar Finder.

My previous problem is when connect with AFP, click the folder name with eject icon, the folder is disappear.

This tutorial is make the folder clickable at the Sidebar Finder but only after connecting to AFP via Finder -- Go -- Connect to Server. Maybe someone can make this displaying with or without connecting to server manually, just like SMB Share.

Thanks and really sorry about my english.

seaside
Starter
Starter
Posts: 15
Joined: 20 Nov 2012 18:20
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by seaside »

fireheadman wrote:Much better explanation and extremely SIMPLE to implement.
Did not have to jump through the hoops above.
This link explains it... http://thegeek.mobi/viewtopic.php?f=9&t=6

This link shows it in action... http://www.youtube.com/watch?v=hX3Ghwq4ctM
Great this method did the job for you! It didn't work for me (at least not reliable) hence the other solution I presented.

A disadvantage of the solution presented in your link is that time machine will eat up your entire disk on your NAS when creating backups. If that is no problem for your setup you're ready to roll ;-).

WRT the connection problems to your backup disk. This is related to an authorization method change implemented by Apple in AFP with I believe 10.7. There is a workarounds floating around I had to use myself to get OSX to access my disk. That's not TimeMachine related.

Best regards

seaside
Starter
Starter
Posts: 15
Joined: 20 Nov 2012 18:20
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by seaside »

pakpenyo wrote:Thanks seaside. This work for me with new 10.9 Mavericks but i'm not using as Time Machine backup. I'm only need to displaying my AFP in the Sidebar Finder.

My previous problem is when connect with AFP, click the folder name with eject icon, the folder is disappear.

This tutorial is make the folder clickable at the Sidebar Finder but only after connecting to AFP via Finder -- Go -- Connect to Server. Maybe someone can make this displaying with or without connecting to server manually, just like SMB Share.

Thanks and really sorry about my english.
You have to login to the server before you are able to access any folders.

When the server shows up in the sidebar (it should even with the default NAS4Free setup) klick on it. You should see a connect button in the folder window. Use it to login with your user id and password you provided when setting up a share using the NAS4Free Web-GUI.

If you can't see this button switch the folder view to as Columns.


Best regards

conor__
NewUser
NewUser
Posts: 7
Joined: 11 Nov 2013 21:51
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by conor__ »

Seaside - thanks so much for this. I worked through it and with a tiny bit of trial and error I can finally access the Time Machine share.

Litil
Starter
Starter
Posts: 35
Joined: 14 Aug 2013 12:50
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by Litil »

Hi,

First of all, thanks for this howto Seaside, very useful for newbie people like me :D

My OSX is Lion (10.7.5) can I use this configuration procedure in my system?

Thanks

TomDS
NewUser
NewUser
Posts: 1
Joined: 14 Aug 2014 18:54
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by TomDS »

I tried all the above on my OSX 10.9.4 but no luck ... i get the below message after a minute or so "Connecting" :

There was a problem connecting to the server “TimeMachineNAS”.
The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again.

I do however see the Time Machine volume under the Shared section in finder ...

What could be wrong ?

User avatar
mooblie
experienced User
experienced User
Posts: 85
Joined: 23 Jun 2012 13:31
Location: The Highlands, Scotland
Contact:
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by mooblie »

Works for me on OS X 10.9.4. Have you definitely got this set up?:

Image
Martin

valdbob
NewUser
NewUser
Posts: 2
Joined: 29 Dec 2014 09:32
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by valdbob »

Hi,
I can't see in my Web GUI the last two field (Automatic disk discovery & Automatic disk discovery mode). I See only the field Auxiliary Parameters.
I use the release NAS4Free 9.3.0.2 (revision 1213) x64-embedded.
Do you know if there is some other configuration necessary to obtain this field in the Web Gui?
My iMac in this configuration was unable to discovery disk for Timemachine backup.

Any suggestion?
Thank

chiller
NewUser
NewUser
Posts: 5
Joined: 15 Mar 2015 22:43
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by chiller »

Nice How to.
In the Timemachine settings I can select the "Rewind Time" but I can't connect.
There always comes a pop up:
"Error by connecting to "Rewind Time"

The server may not exist or is currently unavailable . Check the server name or IP address and the network connection, then try again ."



In the Finder I can see Rewind time, too. But when i click on the button connect, there comes a pop up "connection failed"


Sorry my english is not very well but I hope you could understand what my problem is.

User avatar
daoyama
Developer
Developer
Posts: 394
Joined: 25 Aug 2012 09:28
Location: Japan
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by daoyama »

valdbob wrote: I can't see in my Web GUI the last two field (Automatic disk discovery & Automatic disk discovery mode). I See only the field Auxiliary Parameters.
I use the release NAS4Free 9.3.0.2 (revision 1213) x64-embedded.
That is replaced with simple checkbox:
20150707A.png
If your version does not have it, please consider to upgrade latest version.
You do not have the required permissions to view the files attached to this post.
NAS4Free 10.2.0.2.2115 (x64-embedded), 10.2.0.2.2258 (arm), 10.2.0.2.2258(dom0)
GIGABYTE 5YASV-RH, Celeron E3400 (Dual 2.6GHz), ECC 8GB, Intel ET/CT/82566DM (on-board), ZFS mirror (2TBx2)
ASRock E350M1/USB3, 16GB, Realtek 8111E (on-board), ZFS mirror (2TBx2)
MSI MS-9666, Core i7-860(Quad 2.8GHz/HT), 32GB, Mellanox ConnectX-2 EN/Intel 82578DM (on-board), ZFS mirror (3TBx2+L2ARC/ZIL:SSD128GB)
Develop/test environment:
VirtualBox 512MB VM, ESXi 512MB-8GB VM, Raspberry Pi, Pi2, ODROID-C1

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by Parkcomm »

I've just upgraded to 10.1.0.2 - Prescience (revision 1702), from 9.3 and have found that time machine has stopped working.

Code: Select all

Backup Disk Not Available
I've disabled/reenabled "Time Machine support" and restarted the AFP shares. And in the system advanced tab I have disabled/reenabled "Enable Zeroconf/Bonjour to advertise services of this device" to no avail.

Is this a bug in this BETA version? Anyone else se this problem?
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by Parkcomm »

Just tried removing the disk in Preference/Time Machine on the mac and then reenabled (I did not try this because I thought i might blow away my old back ups)

Good news - all good now including keeping the old backups.
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

bupban
NewUser
NewUser
Posts: 6
Joined: 31 Aug 2014 09:36
Status: Offline

Re: [HOWTO]Time Machine setup for OS X 10.8.x

Post by bupban »

All
this is just to confirm that Time Machine Backup on 10.2.0.2 (Prester, rev 2235) works like a charm using the checkbox in the afp share setup.

On N4F 9.2 and 9.3 I had trouble with that and only got it up and running by using the instructions of the first post of this HOWTO from seaside on Nov 2012. And: All of my previous TM backups are still there. No loss of data. That's really cool.

Best, bupban

Post Reply

Return to “[HowTo]”