Tuesday, 16 October 2012

How to setup Time Machine to work on NAS

Although everyone knows that he should back up his data but it is indispensable that you will forget to backup your data. You may go years without ever losing a file or data but one bad software updates may cause you to reinstall your Mac OS. In such cases, you may lose your precious data. Apple has an inbuilt utility called Time Machine which can keep backup of Mac data and you can avoid data loss. A network attached storage is used to keep backup via Time Machine.

Set up Time Machine on a NAS(Network Attached Storage):-
First, on the NAS:-
1. Login to your NAS and setup a new shared folder, I called mine TMBACKUP.
2. Setup a new user called the same as the shared folder. I called mine TMBACKUP as well.
3. Assign RW privileges to the user to the TMBACKUP folder
4. Create a sparsebundle image on your local system. You can accomplish this using hdiutil command.
hdiutil create -library SPUD -size $SIZESPEC -fs Journaled HFS+ -type SPARSEBUNDLE -volname $MACHINENAME_$MAC_ADDRESS.sparsebundle

Where $SIZESPEC is the size of the backup volume, and $MACHINENAME_$MAC_ADRESS is your Mac's name followed by an underscore and then your Mac's MAC Address. The -size parameter can probably be as large as you want.

5. Create and set permissions on your network share. Just make sure you have read/write permissions set.
6. Copy the sparsebundle to the network share root. Mount your network share and copy it over. I used this Terminal command after the MyBackup share was mounted: - cp -r mymachine_0017f2c8426b.sparsebundle /Volumes/MyBackup/.

6. Make sure you have read/write permissions on the network share, and that you've run the infamous defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1. Now just change your Time Machine disk to that network share.

Conclusion:- In less than 10 minutes, you can set up Time Machine, and secure your data to give you peace of mind. You can access and restore individual files and folders from backup area. Time Machine is both a time and cost effective method of backing up your Mac, and once you set it up, you do not to worry about your data.

No comments:

Post a Comment

We do not accept comments containing with links.