-

How to: Configure FreeNAS 9.3 for Time Machine with disk quotas

Posted by aionman on Jul 21, 2016 in Mac, NAS

How to: Configure FreeNAS 9.3 for Time Machine with disk quotas

 

FreeNAS is an amazing software stack and purpose built for hosting dedicated file storage shares, so it makes for an excellent platform to host a Time Machine compatible network share for use with OS X.

I wanted to build a server that would provide a reliable backup location with data redundancy for multiple Macs, with the ability to scale the storage space to meet future needs. Something which the current line of Apple TimeCapsules don’t offer, not to mention they are expensive for what they offer.

This setup will allow any Mac on the local network to backup to a central server using Ethernet/Wireless. I have gone the extra mile and included the ability of being able to remotely backup my MacBook Pro when away in London to my FreeNAS server at home using my OpenVPN server, but that’s for another post.

To clarify this was my first time using FreeNAS, I had no prior experience with the platform before writing this guide, so anyone should be able to recreate my setup with no prior knowledge of FreeNAS. My post is an updated version of an existing article I found, but is also a result of my own trial and errors. It takes time to figure out what works and what doesn’t.

Hardware

For storage I picked up 4 x WD Red 3TB for NAS (Inc WD Express Warranty) for £91.99 each (£183.98 total). I picked the 3TB over the 4TB partly because of cost, but namely for reliability as numerous forums discuss high failure rates for the 4TB models.

I decided to utilise one of my G7 HP MicroServers as a dedicated FreeNAS server. The 2 WD Red drives were installed for storage, as well as a 32GB SanDisk Cruzer for the FreeNAS OS. I also maxed out the 16GB Kingston ECC RAM to help cope with the ZFS filesystems (the minimum recommended is 8GB).

Prerequisites


You need to have a working install of FreeNAS before you can attempt this guide. I won’t detail over the OS installation as it’s fairly simple and has been documented numerous times over online, without forgetting to mention the amazing documentation that comes with FreeNAS Doc.
FreeNAS 9.3 is the current release at time of writing and is what this guide is based on, although future versions should also work fine.

Create ‘time-machine’ Group

The first step is to create a system group for the Time-Machine share in preparation for adding users.
Under the ‘Account’ menu item, expand the ‘Groups’ item, then select ‘Add Group’. Note that in my screenshots I already have a group called ‘Time-Machine’, your system won’t have until you complete this step.

An ‘Add Group’ dialog box should pop up, prompting you to create the new group.

Set the config as follows:

  • Leave ‘Group ID’ to whatever it is by default
  • Set ‘Group Name’ to ‘time-machine’

Leave everything else as default and click OK. Our newly created ‘time-machine’ group should be visible under the ‘Groups’ section now.

Create and Configure Time-Machine ZFS Dataset

Now it’s time to create the ZFS dataset which will be used to store the Time Machine backups. You must have a ZFS volume already created for this step, if you haven’t got one then you should go read through the ZFS primer in the FreeNAS docs.

Under the ‘Storage’ tab select the ‘Volumes’ menu item, then select your ZFS volume (Volume1 in my case) and then select ‘Create Dataset’.

A ‘Create ZFS Dataset’ dialog box should pop up, prompting you to create the new ZFS dataset.

Ensure the wizard is in ‘Advanced Mode’ and then set the config as follows:

  • Set ‘Dataset Name’ to ‘Time-Machine’
  • Set ‘Quota for this dataset’ to ‘1000 GiB’

In the section option we are specifying a quota for the dataset, effectively settings the size of available disk space for our Time Machine backups. Change the value if 1000 GiB is not suitable for your setup.
Leave everything else as default and click ‘Add Dataset’. Our newly created ‘Time-Machine’ dataset should be visible under the ‘Volumes’ section now.

Now we need to configure the permissions for our ‘Time-Machine’ dataset, so that our ‘time-machine’ group has read/write access.
Select the dataset (Time-Machine) and then select ‘Change Permissions’.

A ‘Change Permissions’ dialog box should pop up, prompting you to edit the ZFS dataset.

Set the config as follows:

  • Set ‘Owner (group)’ to ‘time-machine’
  • Set ‘Mode’ checkboxes to the same as mine in the screenshot

Click ‘By setting the group owner to the ‘time-machine’ group, we are granting any users of that group read/write/execute permissions.

Create Time-Machine Users

Now it’s time to create a separate user to represent each computer that will use the FreeNAS server for Time Machine backups.
Under the ‘Account’ menu item, expand the ‘Users’ item, then select ‘Add User’.
FreeNAS Create User Dialog
Set the config as follows, but change the relevant information related to your setup:

  • Leave ‘User ID’ to whatever it is by default
  • Set ‘Username’ to ‘dans-macbook-pro’
  • Ensure ‘Create a new primary group’ is deselected
  • Set ‘Primary Group’ to ‘time-machine’
  • Set ‘Full Name’ to ‘Dan’s MacBook Pro’
  • Set ‘Password’ to something strong (mix of; uppercase, lowercase, numbers, 16 chars long)

Leave everything else as default and click OK. Our newly created ‘dans-macbook-pro’ should be visible under the ‘Users’ section now.

Create Time-Machine AFP Share

The last step on the FreeNAS server is to create the AFP Share that will broadcast the storage on the local network.
Under the ‘Sharing’ tab select the ‘Apple (AFP)’ menu item, and then select ‘Add Apple (AFP) Share’.

Ensure the wizard is in ‘Advanced Mode’ and then set the config as follows:

  • Set ‘Name’ to ‘Time Machine’
  • Set ‘Path’ to your ZFS dataset path
  • Set ‘Allow List’ to ‘@time-machine’
  • Ensure the ‘Time Machine’ box is checked
  • Ensure the ‘Default file permission’ is set to the same as the screenshot
  • Ensure the ‘Default directory permission’ is set to the same as the screenshot

Add Time Machine Backup to OS X

Finally the last step is to configure Time Machine itself to backup to the newly created share.
In OS X, select ‘Time Machine’ from within ‘System Preferences’, and then click the ‘Select Disk’ button.
Add FreeNAS to Time Machine in OS X Dialog
All being well your FreeNAS AFP share should be listed. If you select to use the disk for Time Machine you will be prompted to enter the username and password for the FreeNAS user we created previously. That’s the last step, Time Machine should begin backing up shortly after adding the disk. I recommend that the first backup be completed over Ethernet instead of wireless as the initial backup can take considerable time.

I have used this setup for a couple of years now backing up 4/5 Mac’s with no real issues. Any problems I have ran into have most revolved around sudden shutdowns of the FreeNAS server midway through Time Machine backing up due to power cuts/loss. My Storage is setup using ZFS in striped mirrored mode, meaning I get the best of both for speed and disk redundancy.

Please let me know if you found this guide useful, or spot any mistakes above.

 
-

Rebuild the Outlook for Mac 2011 database to resolve problems

Posted by aionman on Nov 7, 2012 in Mac, Microsoft Office

How to rebuild your identity database

Step 1: Quit all applications

You must quit all applications before you continue with the following steps. To quit an application, click the <application name>menu on the toolbar (top), and then select Quit. If you cannot quit an application or do not know how, hold down the Command and Option keys, and then press Esc on your keyboard. Select the application in the Force Quit Application window, and then select Force Quit. Click Force Quit to quit the application.

Note You cannot quit Finder.

When you are finished, click the red close button in the upper-left corner to close the window.

 

Step 2: Determine the amount of space available on the hard disk

Before you perform any database maintenance, make sure that you have at least three times as much hard disk space available as the current size of your Outlook identity. For example, if the identity is 1 gigabyte (GB), there should be at least 3 GB of free space available on the hard disk (not including the space that is needed for virtual memory).

To determine the size of your identity, follow these steps:

  1. n the Finder, click Go, and then click Home. Open the Documents folder.
  2. Open the Microsoft User Data folder.
  3. Open the Office 2011 Identities folder.
  4. Click the Identity folder.
  5. On the File menu, click Get Info, and then click Get Information. Note the size of the database.

When you create an Outlook identity, hard disk space is allocated for the data that the identity receives as you work. When you add and delete messages, appointments, tasks, and notes, the database can develop wasted space.

Step 3: Discover and back up the current identity

To back up your identity, follow these steps:

  1. In the Finder, click Go, and then click Home. Open the Documents folder.
  2. Open the Microsoft User Data folder.
  3. Control-click or right-click the Office 2011 identities folder, and then select Duplicate. A copy of the folder is created.
  4. Quit all applications.

You have created a backup of your identity (or identities) and are ready to continue.

Note This backup can be used by third-party database recovery software, which generally work better on non-rebuilt identities.

Step 4: Rebuild the database 

  1. Quit all applications.
  2. Hold down the Option key on the keyboard, and then start Outlook 2011.Note You can also browse to the Database Utility by opening the Application folder and then opening the Microsoft Office 2011 folder. Open the Office folder, and then double-click Microsoft Database Utility.app.
  3. In the Database Utility window, select the database that you want to maintain, and then click Rebuild.
  4. The Rebuilding Main Identify window will open and show the progress. When the operation is completed, you will receive the message “Your database was rebuilt successfully.”
  5. Click Done.

 

Start Outlook and see whether the problem is resolved. If the problem is not resolved, go to the next step. 

 

Step 5: Create a new identity

If you are using Outlook in more than one capacity, such as at home and at work, Outlook may be configured to have multiple identities. Each identity stores separate sets of e-mail, address books, tasks, calendars, account settings, and more.

If Outlook has multiple identities, one of the identities might be damaged. Try to use a different identity to determine whether this is the problem. If an identity is damaged, you must create a new identity to resolve this problem.

To create a new identity, follow these steps:

  1. Quit all applications.
  2. Hold down the Option key on the keyboard, and then click the Outlook icon in the dock. The Microsoft Database Utility will open.Note You can also access the Microsoft Database Utility by opening the Application folder and then opening the Microsoft Office 2011 folder. Open the Office folder, and then double-click Microsoft Database Utility.app.
  3. Click the plus [+] sign to add a new identity, and then type a name for the new identity. For example, type New identity.

  4. Set the newly create identity as the default. To do this, select the newly created identity, click the Action button, and then select Set as Default.

  5. Quit the Microsoft Database Utility, and then restart Outlook and see whether the problem is resolved.

If the previous steps did not resolve the issue, the Outlook database most likely is damaged beyond repair. If there are no viable backups available and there are no other sources of the data (such as another computer or a handheld device), you will have to start from scratch because the data is not recoverable. To start from scratch, you have to drag the Office 2011 Identity folder (only if there are no other identities) to the Trash, and then restart Outlook.

Tags: ,

Copyright © 2017 IT Support Blog All rights reserved. Theme by Laptop Geek.