Welcome, Guest! Log In | Create Account

Time Machine

Apple Filing Protocol, a network protocol for file services

Moderator: fulgas

Time Machine

Postby n6mod » Wed Jan 21, 2009 8:32 pm

I'm new to FreeNAS, and this forum thinks that "time" and "machine" are too common to search on, so forgive me if this has been discussed elsewhere.

I've noticed there's been a flurry of products released recently that directly support Time Machine.

HP's new Windows Home Server boxes do it, as does the new LaCie NAS box. Both are claiming to be the first third-party NAS to support Time Machine. And Netgear blogged about support in the next release of the ReadyNAS Pro. That blog entry does look like they're still setting up a sparsebundle. But none of these mention anything about having to hammer defaults to show 'unsupported' NAS devices.

So, what's the secret? How does this stuff work, and how hard would it be to support it in FreeNAS?
n6mod
 
Posts: 4
Joined: Thu Oct 30, 2008 1:34 am

Re: Time Machine

Postby adisor19 » Thu Jan 22, 2009 8:51 pm

Hi,

If i understand correctly from what i've been reading so far, the secret is a special version of netatalk that is compiled with encryption support. Basically it's a patch Apple added to the AFP protocol that encrypts the connection between client and server. If netatalk is compiled with this support then we do not need to play with the defaults in order to see the freenas AFP share in the Time Machine options. Unfortunately i don't have more details than this. Maybe Volker can shed some light on this ?

Adi

EDIT : Here's the link to the ReadyNAS blog describing how to make it work with TM. http://www.readynas.com/?page_id=756

Basically, this is how TM should work if netatalk would be compiled with encryption support. No hacks would be needed. I'll try and scour the web for more detailed instructions and post them there. Hopefully the devs would be able to implement them at one point.
User avatar
adisor19
 
Posts: 65
Joined: Mon Nov 03, 2008 10:36 pm

Re: Time Machine

Postby tmallon » Fri Jan 23, 2009 2:19 am

I too have been in search of TM support and would like to use freenas, I have the AFP share setup but just can not seem to get TM to connect If anyone has any insight I would greatly appreciate it.
tmallon
 
Posts: 1
Joined: Fri Jan 23, 2009 2:08 am

Re: Time Machine

Postby misterredman » Fri Jan 23, 2009 10:50 am

By looking around on the net I was able to make Time Machine work with my samba share. SHould be the same with AFP.
First thing you need to do is to enable the finder function that shows unsupported volumes (Apple disabled that by default). So you need to open terminal and type this:

Code: Select all
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1


(you can always revert back by changing the "1" with a "0")

Then you need to create the sparsebundle image (always in terminal) since Time Machine is not able to do it alone:

Code: Select all
hdiutil create -size $SIZEg -fs HFS+J -type SPARSEBUNDLE -volname "Backup of $MACHINENAME" $MACHINENAME_$MACADDRESS.sparsebundle


Of course you need to substitute the parts starting with the $ symbol with the actual values. E.g.:

hdiutil create -size 200g -fs HFS+J -type SPARSEBUNDLE -volname "Backup of MacBook" MacBook_1234567890.sparsebundle

for an imagesize of 200GB, with the computer name "MacBook" and a MAC address 12:34:56:78:90 (the MAC address can easily be found in the Network Pref panel, by selecting the ethernet adapter, then clicking the "advanced" button and opening the "Ethernet" tab.

You can then copy the sparsebundle image to the share through the finder.

At this point keep the share mounted and select it as the Backup Disk in the Time Machine pref panel.
The backup should work now.
Come Fare Domande in Modo Intelligente

NAS1: 0.69.2 4700 i386 embedded - Celeron 2.53GHz - IBM ThinkCentre M50 8189 - 768MB RAM - 2xSATA + 3xIDE HD.
NAS2: 0.7 4919 amd64 embedded - Pentium Dual Core E6300 2.8GHz - Asus P5Q-EM (Intel® G45/ICH10R, RTL8111C NIC) - 2GB DDR2 RAM - 5x1.5TB HD154UI in RAIDZ1 - 1x500GB WDC5000AAKS for torrent.
User avatar
misterredman
 
Posts: 213
Joined: Fri Oct 24, 2008 4:52 pm
Location: Switzerland

Re: Time Machine

Postby matphi » Fri Jan 23, 2009 12:00 pm

I did ask about this here viewtopic.php?f=13&t=906 at around the same time, I'm glad to see that I'm not the only one interested in this, I hope that means it can be made to work at some point.

In response to misterredman above, that's a known hack that will work for most anything, manually creating the sparsebundle and enabling unsupported devices is not something I'm comfortable with, especially as I've read that if you try to store more data in that bundle, it wont error, it will corrupt.

I'm sure that Apple want to sell lots of their Time Capsule hardware, but if they are letting HP and Netgear act as a compatible unit, then the spec is either open or available by license, I'll try to find out which.
matphi
 
Posts: 29
Joined: Sat Dec 27, 2008 2:39 pm

Re: Time Machine

Postby misterredman » Fri Jan 23, 2009 2:06 pm

matphi wrote:In response to misterredman above, that's a known hack that will work for most anything, manually creating the sparsebundle and enabling unsupported devices is not something I'm comfortable with, especially as I've read that if you try to store more data in that bundle, it wont error, it will corrupt.


Well, it actually seems that the issue you mentioned about filling more data was recently solved (through an update from Apple). Anyway I agree completely with you about finding a better solution. Although I have been using Time Machine to FreeNAS as a backup for my mac with no problems for about 6 months, that is not my only backup solution.
If we could find out how to make the disc available directly it would really be nice.
Come Fare Domande in Modo Intelligente

NAS1: 0.69.2 4700 i386 embedded - Celeron 2.53GHz - IBM ThinkCentre M50 8189 - 768MB RAM - 2xSATA + 3xIDE HD.
NAS2: 0.7 4919 amd64 embedded - Pentium Dual Core E6300 2.8GHz - Asus P5Q-EM (Intel® G45/ICH10R, RTL8111C NIC) - 2GB DDR2 RAM - 5x1.5TB HD154UI in RAIDZ1 - 1x500GB WDC5000AAKS for torrent.
User avatar
misterredman
 
Posts: 213
Joined: Fri Oct 24, 2008 4:52 pm
Location: Switzerland

Re: Time Machine

Postby matphi » Thu Jan 29, 2009 1:16 pm

I didnt know it had been fixed, to be honest I read 'backup' and 'data corruption' in the same sentance and ran, I didnt actually validate the souce. If it's fixed then thats great and I may go ahead and set it up (I probably will actually).

From what I'm able to find on the net, the full details of the time machine protocol are not known so it looks unlikely that FreeNAS will show up in the interface as a supported drive any time soon.
matphi
 
Posts: 29
Joined: Sat Dec 27, 2008 2:39 pm

Re: Time Machine

Postby adisor19 » Thu Jan 29, 2009 7:38 pm

FOUND IT !!

A user posted the how to on the netatalk mailing list : http://marc.info/?l=netatalk-devel&m=12 ... 716326&w=2

"Hi,

I just wanted to let you know that I have now a fully working
timecapsule replacement (meaning accepted by OSX). To also have these
shiny new feature follow the steps below.

1) Make sure you have applied at least the afp_fsyncdir patch to
netatalk (and check if it works, it still needs to be updated). This
step makes the volume recognized by TimeMachine.

2) To have the nice "airport disk feature" in Finder (or auto
detection of supported volumes) it is necessary to have a mdns daemon
which supports multiline TXT fields. Avahi works, I also tried mDNS
but I could not get it to recognize multiple lines.

the first record exists of "sys=waMA=<YOUR:ETHERNET:ADDRESS:HERE>"
the second record is "dk2=adVF=0x83,adVN=<AVOLUMENAMEFORBACKUP>,adVU=<A-UUID>"

(dk2 could be different, I havent tracked that down yet)

for example my adisk.service for Avahi looks like this:

<service-group>

<name replace-wildcards="yes">TimeCapsule</name>

<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>

<service>
<type>_smb._tcp</type>
<port>445</port>
</service>

<service>
<type>_adisk._tcp</type>
<port>9</port>
<txt-record>sys=waMA=XX:XX:XX:XX:XX:XX</txt-record>
<txt-record>dk2=adVF=0x83,adVN=backup,adVU=956cf67c-f448-453f-9dec-dd17855ee076</txt-record>
</service>
</service-group>

3) create .com.apple.timemachine.supported file in the volume you
would like to backup on

That's all there is to it. What I would like to have done is create a
new option "adisk" which would register the _adisk._tcp in zeroconf
automagically and a "timemachine" option to volumes which would
automagically create .com.apple.timemachine.supported. Additionally
this last option could set the maximum amount of free space for that
volume as TimeMachine allocates as much free space in the sparsebundle
as there is available on the volume.

Regards,
Bolke

--

--
Bolke de Bruin
bdbruin@gmail.com
"

I've already opened a feature request on the official FreeNAS feature request list but maybe we can ask the devs nicely if this can be implemented in the next version now that we know the "secret sauce" to it ?

Adi
User avatar
adisor19
 
Posts: 65
Joined: Mon Nov 03, 2008 10:36 pm

Re: Time Machine

Postby adisor19 » Fri Jan 30, 2009 1:09 pm

I also made a donation :)

I think it's not a bad idea if more of us would do the same ;)

Adi
User avatar
adisor19
 
Posts: 65
Joined: Mon Nov 03, 2008 10:36 pm

Re: Time Machine

Postby matphi » Sun Feb 08, 2009 12:15 pm

That looks intersting!

I've read those instructions a few times and I still dont understand what to do to make this work. It looks like this means that if the FreeNAS developers see fit, they could make an update to version .69 that would have a 'timemachine' service tab that could be enabled in the gui, is that right?

I know FreeNAS is extensible and modules can be created by the community, if someone else can do it then I'm cool with that also. I will go and read the post again and start some research on Monday, I'll be starting from scratch but if I can write the required modifications and get them working then I'll submit the changes, but at this stage I'm struggling to understand the instructions! I guess it's because of my linux/windows background rather than a bsd/mac one.
matphi
 
Posts: 29
Joined: Sat Dec 27, 2008 2:39 pm

Next

Return to AFP

Who is online

Users browsing this forum: No registered users and 1 guest