This is a guide on how to set up a Ubuntu Server to act as a TimeMachine Backup Server, using a Auto Mounted HFS+ Jounaled Parition and a DD-WRT Router to WAKE ON LAN the Ubuntu Machine in case it shuts down.
We will follow these simple steps:
1. Format the drive as HFS+ Journaled
2. Set Up DD-WRT to assign Ubuntu Server with Static IP and WOL
3. Set up Ubuntu to auto mount the HFS+ Journaled Partition one every book
4. Set up Netatalk server on Ubuntu to run as Time Machine
5. Set up Mac to Backup to Ubuntu Time Machine
1. Format the drive as HFS+ Journaled
- Connect and power the drive
- Open Applications
- Open Utilities
- Open Disk Utility
- On the left you should see the hard drive listed. It should show the drive size with a second indented line beneath it that shows the volume of the drive.
- Click Erase at the top of the screen.
- Select Mac OS Extended (Journaled) for the volume format option.
- Change the name of the drive if desired – for our example we will set it to “TimeMachine“
- Click Erase at the bottom of the screen. You will receive a warning and will need to click Erase again.
2. Set Up DD-WRT to assign Ubuntu Server with Static IP and WOL
First we use the router to assign the Ubuntu server a static IP
- Log into the DD-WRT Web GUI
- Go to the Services tab
- DHCP Daemon should be enabled
- If there is no blank slot under “Static Leases”, click Add
- Enter the MAC address of the client interface – to get this run the “ifconfig” command on ubuntu – look for something like
02:23:8s:4d:31:82
- Enter the hostname of the machine – to get this run the “hostname” command on ubuntu – for our example we got “timemachine”
- Enter the desired IP address for this machine – for our example we will use – “192.168.11.100”
- Scroll to the bottom of the page and save your changes.
- Reboot your Ubuntu machine to make sure you receive the 192.168.11.100 IP Address
Now to set up WOL
- Enable WOL in the Bios on the Ubuntu Machine – you can google how to do this
- Log into the DD-WRT Web GUI
- Click on the Administrator Tab
- Click on the WOL Tab
- Tick the Enable WOL box next to the Ubuntu Machine
- Apply Settings
- Shut down the Ubuntu Machine
- Click on the WAKE UP button on the DD-WRT WOL page to wake up the ubuntu machine
- The Ubuntu Machine should now wake up
3. Set up Ubuntu to auto mount the HFS+ Journaled Partition one every book
1. Install HFS Progs
sudo apt-get install hfsprogs
2. Create a mount point dir
sudo mkdir /media/timemachine
3. chmod the dir
sudo chmod 777 /media/timemachine
4. Insert the USB HDD
5. Find the USB Drive UUID
sudo blkid
You should see something like this
/dev/sdc2: UUID="414e84df-127a-3402-8737-8ec308130509" LABEL="TimeMachine" TYPE="hfsplus"
6. Edit fstab
sudo nano /etc/fstab
7. Add the following to the bottom of that file – replacing the UUID with yours
UUID=414e84df-127a-3402-8737-8ec308130509 /media/timemachine hfsplus force,rw,user,auto 0 0
8. Reboot the Ubuntu machine and the drive should now be mounted with RW permissions
4. Set up Netatalk server on Ubuntu to run as Time Machine
1. Install everything needed
sudo apt-get install netatalk avahi-daemon
2. Backup the configuration file
sudo mv /etc/netatalk/AppleVolumes.default /etc/netatalk/AppleVolumes.default.old
3. Edit the netatalk config file
sudo nano /etc/netatalk/AppleVolumes.default
4. Add these line – replacing youruser with your ubuntu username
:DEFAULT: options:upriv,usedots /media/timemachine "TimeMachine" options:tm allow:youruser
5. Restart Netatalk
sudo service netatalk restart
You should now be able to see the drive appear on your Mac
5. Set up Mac to Backup to Ubuntu Time Machine
1. On your Mac find the Share in Finder under shares – Connect with your ubuntu usersname and password
2. Create a directory to make sure you have write access
3. Open Time Machine
4. Select the TimeMachine Disk on the Ubuntu server and start you Backup
Let me know if you have any questions
Peace
Credits:
http://www.hgst.com/support/faqs/how-format-my-drive-mac-only-hfs
http://www.dd-wrt.com/wiki/index.php/Static_DHCP
http://d43.me/blog/1660/concisest-guide-to-setting-up-time-machine-server-on-ubuntu-server-12-04/
http://askubuntu.com/questions/332315/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu-without-access-to-os
One thought on “How to: Ubuntu Netatalk Time Machine – Auto Mount Mac USB HDD HFS+ Journaled Partition – DD-WRT WOL”