A few days ago, I built an HTPC and installed Ubuntu Desktop 12.10. My main purpose for this was to use it as an XBMC HTPC but also as a "NAS" where I can stream mp4 files from and also as a time machine back-up for my MacBook Pro that runs Snow Leopard.
I came across this how-to that details how to enable Ubuntu for Time Machine by without using the code below:
Defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Apparently, using this workaround wasn't the safest thing to do. In any case, this is the code that enables Time Machine usage.
First install Avahi, no config files need to be edited.
sudo apt-get install avahi-daemon
Now install netatalk, on ubuntu 12.04 you should get version > 2.2 that supports the required DHX2 agreement protocol used by afp.
sudo apt-get install netatalk
Now edit the file afpd.conf and add the DHX2 agreement protocol
sudo nano /etc/netatalk/afpd.conf #add the following line at the end of the file: - -tcp -noddp -uamlist uam_guest.so,uams_dhx2_passwd.so -nosavepassword
Finnaly edit the following file:
sudo nano /etc/netatalk/AppleVolumes.default
Comment out ~/ home directory entry in the last lines of the file.
#comment out this line: ~/ "Home Directory"
Add this line below the commented out line. The size of the TM backups quickly increases in size. If you don't specify any size limit on the TM volume it will use the entire disk. To add this size limit you have to add the "volsizelimit:size in MiB" parameter to the last line above. So to limit "TM on Ubuntu" to use maximum 100GB of the drive the line would look like this:
/path/to/TimeMachineFolder "TM on Ubuntu" cnidscheme:dbd options:usedots,upriv,tm volsizelimit:100000 allow:userToUseOnTimeMachine
First is the path of the folder to use on the Time Machine, second part is the name that will be shown on the mac (here TM on Ubuntu). The allow setting sets what user on the Ubuntu server should be given access to the Time Machine folder, this user allso has to be the owner for the "/path/to/TimeMachineFolder".
If needed, create the TimeMachineFolder, the ubuntu user and set the folder rights:
sudo mkdir /path/to/TimeMachineFolder sudo chown userToUseOnTimeMachine:userToUseOnTimeMachine /path/to/TimeMachineFolder
//restart service: sudo service netatalk restart
You know what, the thing works! My time machine was able to use my HTPC!
However, suddenly, I am not able to see my shared folders. Before I run this code, I was able to see shared folders from my Ubuntu HTPC. Now, only see the Time Machine folder and not my shared folders.
To create my shared folders in Ubuntu, I right clicked the folder and clicked PROPERTIES>SHARE. I then clicked on the boxes that said: (1) Share this folder, (2) Allow others to create and delete files in this folder, and (3) Guess access.
Do you know why I'm unable to see the shared folders when I enable netatalk? Any idea how to fix this?