Setting up Time Machine Support on Synology

Posted on April 15, 2012

63


How many trips back in time do you have to take to get to the center of Time Machine backups on Synology

We’re sending you back to the future

Well this might take a few versions.  I feel like I’ve travelled down this road a few times before in search of the right solution all while trying to avoid previous failed attempts.  My apologies.  This post was supposed to go live way back last year, but I kept running into little glitches that I wanted everyone else to avoid!  Issues like using iSCSI vs AFP stability, performance lags using Time Machine vs benchmarks with rSync, crazy issues with OS X Lion breaking Time Machine backups to NAS devices that used to work fine in Snow Leopard, etc.

Thankfully Synology’s updated its DSM firmware (DiskStation Manager versions 3.2 and 4.x) to include the new version of Netatalk (AFP) required for Time Machine backups on Macs running OS X Lion 10.7.3.

So I’m happy to report a “Back to the Future 2012” working solution for our Time Machine!

First things first.  I usually like to refer to official Synology instructions as a balance against my postings, but in this case Synology’s website instructions on how to set up Time Machine are all out of date.  They recently shipped DSM 4 so hopefully they’ll update their official Time Machine steps soon.  You can check here and here.

Apple’s own Time Machine documentation can be found here.  Unfortunately it doesn’t cover backups to a NAS, but it does go over the features you may need to understand for configuring Time Machine in Step 5.

So without further ado…

5 Steps to a Working Synology Time Machine

These instructions  were written April 2012 and tested using a Mac running OS X 10.7.3 and a Synology DS411j running DSM 4.0

Step 1 – Verify Volume Setup

Verify that you have configured your Synology’s drive configuration correctly.  Apple’s Time Machine backups do not have any ability to control how much space they take up. They keep filing your backup volume until it is full and then they just delete older backups to make room for newer backups.  For this reason alone you do NOT want to share your Time Machine backups on the same volume you use other Synology DiskStation features (iTunes server, PhotoStation, etc).  Make sure you have a dedicated volume that can just be used for backups.

  • Log into your Synology (use the Synology Assistant if you haven’t bookmarked the URL yet).
  • In the upper left corner click on the 4 square icon and choose Storage Manager and select the Volume tab.
  • Write down which volume you are going to dedicate to Time Machine backups.

If you don’t have more than one volume to dedicate to Time Machine feel free to look at my earlier post on setting up your Synology hard drives  that can be found here.

Step 2 – Turn on Shared Folder

Now we need to set up a shared folder on your Time Machine Volume.  This involves a number of steps so take your time.

Main Menu > Control Panel > Shared Folder

  • In the upper left corner click on the 4 square main menu icon and choose Control Panel
  • In Control Panel click on the Shared Folder icon

  • Click on the Create button

This is how you tell Time Machine to find your NAS drive

  • In the Name field enter what you want the drive to show up as in Time Machine.  No spaces allowed.  I recommend adding the word “Time_Machine” to the name to keep things clear.  Keep it less than 45 characters in length.
  • In the Description field enter anything you like, but I recommend your NAS name and email if other folks using this ever have to track it down.
  • In the Location field select the volume you chose from step 1.  Double check this step because you do not want Time Machine filling up space on the wrong volume.
  • Encryption… I’ll be honest I wouldn’t add this option until you verify your first backup.  Synology offers AES level encryption, but it adds hours days to the initial backup and requires you to keep track of your key or your backups will be useless.  If anyone using this feature can comment I’m sure our readers would be interested.  This is the only way I know of to auto encrypt your Time Machine backups to your NAS (and anything else placed in this shared folder).
  • Click ok and go back to the Shared Folder and verify you see your newly created shared folder.


Important step to set read/write access to Time Machine Volume

  • With the Time_Machine volume now created choose Privileges Setup to grant read/write access.

Add accounts for each Mac that is going to do Time Machine Backups

  • Select the user logins you’ll be using on your Mac and check read/write access.  This allows Time Machine to manage its backups on your Synology NAS.  I would recommend disabling guest access to the shared folder.
  • I would recommend a new user account for each Mac that is using Time Machine (like the user accounts I have in my screenshot above).  To create new user accounts follow the steps below.

  • To add new user accounts click ok to close privileges setup and go back to your main control panel (House Icon) and click the User icon in File Sharing and Privileges.

  • Click on the create button and fill in the Name, description, email and password info.  Be sure to keep track of the password info or you’ll be forced to delete and recreate the account later.

TIP: I would use the add new user accounts designed specifically for each Mac computer that is going to be backing up via Time Machine (Main Menu>Control Panel>User>Create).  Have the accounts named after the device, ex: iMacTM, MacBookAirTM, MacMiniTM, etc.  This allows you to glance at your connection log file and easily see which Macs have recently backed up.  If you only used your admin account to give each mac access it will be hard to figure out which macs are actually doing their backups and which ones haven’t done one recently.

Set restrictions on how much space a user can access in DSM4

  • TIP: You can restrict how much space Time Machine uses.  When you create a new user account (Main Menu>Control Panel>User>Create) you have the ability to set quota limits in how much data that account can add to a volume.  If you have limited disk space and need to ration backup space across multiple Macs then I would specify a quota limit for each Mac Time Machine account to keep things fair.

Main Menu > System Information > Log > Connection Log

  • TIP: Easily see if all your Macs are backing up regularly. You can see a log of all the Macs that have accessed your NAS for Time Machine backups by going to your Synology’s Main Menu, select System Information, click on the Log tab and choose connection log from the list of log choices.  You will see a list of connection activity and the user account.  AFP events indicate that they used Mac File Services to access your NAS volume in a HFS+ compatible format (even though your hard drives are Ext4 formatted).
  • If you are not interested in encryption skip to Step 3

Encryption Update:

I would use encryption if you have sensitive data and your NAS is accessible via remote access (ftp, http, etc.).  If your Mac hard drives aren’t encrypted and your NAS isn’t accessible outside your own network I don’t see encryption as being all that worthwhile.  If the goal is to back up your data quickly then adding encryption may not be worth the extra time required.  If you were using Apple’s Time Capsule you were already doing network backups without encryption.

How to spend 5 days encrypting your backups

  • After verifying Time Machine was now working fine with normal backups, I decided to go back into the control panel and select shared folders to check out the encryption option for the benefit of my fellow MacSynologists.
  • To enable encryption on the Time Machine backups you should check the “Encrypt this shared folder” and type in an encryption key that you want used (a mixture of UPPER, lower characters and numbers is recommended, I believe 8 characters or more is needed).  Make sure you write this key down!  I use mSecure on the Mac, Windows and iPhone to keep track of passwords like this.  Synology had a good blurb on Encryption here.  If you lose your key you are hosed!  Synology doesn’t offer to store keys like Apple.  It is up to you to be able to remember your encryption key!
  • The “Mount automatically on startup” option should be checked if you want Time Machine to be able access the shared folder.  Otherwise you’ll need to manually mount the drive each time by going back into Shared Folders and choosing the Mount button and retype your key each time your NAS reboots.

  • Once I clicked okay I was presented with this warning dialog,  Read it carefully!  After I said yes I got a progress bar that stayed at 0% for several hours.  If your folder is empty this should probably not take long at all.  I figure I have about 5 more days to go before my 2.1 TB Time Machine backup is fully encrypted.
  • Part of me questions the value of encryption when a person can walk up to any Synology NAS unit, hold the reset button in back for 4 seconds, login with the default access and if the mount automatically on startup is checked they can get access to your backups.  IMHO backups vs encryption makes for conflicting bed partners.

  • If you close the browser window your NAS will continue to work in the background, but you’ll never get the process percentage window back up again.  Time Machine backups will be halted during this time (backup delayed message).  The green HDD lights on the NAS will blink incessantly during encryption (in my case – for 5 days!).  I wish Synology could use my Mac for processing the encryption instead of the ARM CPU.  For those of you that are going to be using encryption on your NAS all the time I would recommend getting a NAS with an Intel CPU.  It is a faster processor that has a FPU (Floating Point Unit) that is much faster than the Marvell ARM processor doing the encryption via software calls.  Edward Lin at Synology was quoted saying that the DS410 is 200% faster at encryption because of its hardware encryption support.

Step 3 – Turn on Mac File Service

Now we need to make our new Time_Machine Shared Folder on your Volume is visible to your Mac so that it’s Time Machine backup program can use it for network backups.

  • In the upper left corner click on the 4 square main menu icon and choose Control Panel
  • In Control Panel click on the Win/Mac/NFS icon

Mac File Services makes the volume accessible to Time Machine

  • Choose the second tab called Mac File Service and select Enable Mac File service.  For old schoolers this is also known as Apple Filing Protocol (AFP).  It was written so Linux/Unix server volumes could be accessed by Macs.
  • In the Time Machine field click on the drop down arrow and select your Time_Machine shared volume we setup in step 2.

  • Click the Apply button and you should get a dialog telling you that the NAS network services will restart  in order to enable the changes.  Make sure your NAS isn’t doing any other important tasks when you do this because once you click apply those tasks will probably get interrupted.  My legalize for just sayin’ think about what you are doing and don’t multitask the NAS during these steps.

  • To restart your Synology choose the 4 square Main Menu icon un the upper left corner and choose the restart choice at the bottom.

Step 4 – Verify your Mac can see the shared folder on your NAS volume

Time to go back to your Mac.  Take a moment to verify you can access the volume we set up for your Mac’s Time Machine program to use.  This will verify if you’ve got steps 1-3 done correctly before proceeding.

  • From the finder (click on your desktop background) choose ⌘K (Command + K) or from the Finder choose the Go Menu and select the last choice Connect to Server.

  • Select browse to see if your Mac already sees your NAS’s Time_Machine shared volume.  If it does go ahead and log in with the user ID that was specified in step 2.  If everything looks correct jump to step 5.
  • If you do not see your newly created volume we need to tell your Mac where to find it.  Use the same IP address you use to log into your Synology NAS and swap the “http:” with “afp:” and keep the IP address path (in my case it was dynamically assigned afp://10.0.1.17 by my router).
  • If you are having problems finding the address of your NAS use your Synology Assistant Application.  It should be in your applications folder or you can download it from Synology.com.

Step 5 – Tinkering with Time Machine Preferences

Now it is time to fire up your Mac’s Time Machine!  We just need to tell it  to use your Synology’s Time_Machine shared volume.

  • On your Mac goto the upper left corner, click on the Apple icon, and choose System Preferences.
  • In your System Preferences double-click on the Time Machine Icon

  • To help monitor Time Machine and for faster access I would check the “Show Time Machine status in menu bar.” option.
  • Choose select disk to navigate to our NAS’s Time_Machine shared volume.

  • Choose your volume.  My volume showed twice (by its DHCP IP address and by name) and choose Use Backup Disk.
  • There is a grayed out encrypt backup disk check box that is a new feature for Time Machine on OS X 10.7.x Macs.  It only works with backup hard drives that are physically attached to the Mac via Thunderbolt, USB or FireWire and formatted in Apple’s HFS+ format.  It does not work over ethernet/WiFi; which includes our NAS and even Apple’s Time Capsule.  Even if it did work, it adds a lot more time to the backup which can already take a lot of time and requires you to keep track of your encryption key.  This is the same encryption found in Apple’s Disk utility named File Vault (Core Storage).
Note to future self : If we run into problems with Time Machine not finding our volume after router reboots we may need to assign a fixed IP address for our NAS to keep Time Machine happy.
 
 
  • You will be prompted to have Time Machine use your login and password for your Synology NAS.  These are the user logins you gave access to the shared folder in step #2.  Using a specific login tailored for each Mac (MacBookTM, MacProTM, etc.) will help you keep track of what Mac has backed up recently in your NAS log files.  The name and password you enter will be stored and used each time Time Machine does a backup.  These can be separate NAS accounts from the admin login you use to access your NAS.

“We all have our time machines, don’t we. Those that take us back are memories…And those that carry us forward, are dreams.” ― H.G. Wells

  • To start the backup now, goto your Apple menu bar, click the Time Machine circle clock icon and choose Backup Now.


Having Time Machine do its first backup to your NAS is truly a wonderful moment.  You’ll have plenty of time to reflect on this moment since Time Machine will take a VERY long time to complete its first full backup!

In my case 22 days!  YIKES!!  Thankfully after 35 hours Time Machine now reports only 14 hours more to go.

Time Travel Further with your NAS!

 
Special credit goes to: Joel Carnat of France who blogged about this back in October 2011 that gave me the courage to simplify and finish this post.  sfsg!
 
 

Troubleshooting Time Machine Messages:

Nothing is more frustrating than losing your previous backups to the message, “Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you.”   I got this message during a Time Machine backup of my MacBook Air to my Synology NAS.

I found a good post from Garth Gillespie on how to manually fix sparse bundle errors here.

The good thing is that I also found that if you applied the 10.7.3 supplemental update (April 2012) that contains several Time Machine fixes and go through with creating a new backup that I haven’t had the problem since.  I also made sure the MacBook didn’t go to sleep during the first big backup in case that was part of the issue (that means keeping lid open, dim the screen, and use the energy saver system preferences to keep the Mac awake).

 

Other sources of Time Machine Failures:

You should also use Apple’s Disk Utility (found in your Mac’s utilities folder) to verify your source Mac hard drives are in good shape.  Use Disk Utility’s First Aid tab to verify disk and verify disk permissions.  In my case a corrupted Mac drive was causing all kinds of Time Machine backup issues.  Frustrating that it took Time Machine failing to backup to point out a drive issue I was having.

 

 

Useful Time Machine Helper Apps:

Came across this cool Time Machine utility application called BackupLoupe that lets you look at your Time Machine backups and make sense of what you are seeing.  It is the first utility I’ve seen that lets you examine your Time Machine backups with this level of detail.  I haven’t tried it yet, but if you’re inclined feel free to report back.

If you’re still reading this and are looking for more relevant info on how Time Machine works I encourage you to read James Pond’s Time Machine FAQ at: http://pondini.org