(See the pdf version in Sami/Documents)
I'm new to the OSX scene, but have some experience with the Unix world... I've bought a QNAP TS509Pro and a MacBook Pro and wanted to
know more about backup and restore using the above combination using Time Machine.
There are a lot of sources with parts of this walk-through but I try to make it as comprehensive as possible.
! Disclaimer: I am not responsible for any loss of data and/or functionality of your Mac and/or QNAP machine. !
Setup a TimeMachine on the QNAP
Setup:
– MacBook Pro running OSX 10.5.6 (hostname eight)
– QNAP TS509Pro running 2.1.5 build 0408T (SMB + AFP sharing)
! Keep the Computer Name (hostname) simple (< 8 characters) and without spaces...
Turn TimeMachine off at this point in the System Preferences (if already
disabled skip this step)
If you see a closed lock at the bottom of the page click the lock and
type you password (assuming you have admin rights) to unlock the
preferences pane.
Apple TimeMachine with QNAP NAS v0.1.2 Page 1/4
1. Open the Terminal application (⌘+space to open Spotlight (or click op the magnifying glass in the upper right corner) and type Terminal)
For those new to this funny blinking cursor do not be afraid :-)
You'll see something like this:
Last login: Thu Apr 23 15:34:14 on ttys001
eight:~ $
2. Create a special file which will be used by TimeMachine called a sparsebundle (virtual filesystem image)
In my case I made the file as big as my internal HDD (350 Gbyte) because if my internal disk would fill up to the max I still have 1 total backup.
cut and paste the following whole line (without the $) into the Terminal application
$ HN=`hostname | cut -f1 -d.` ; echo $HN
and you will see something like:
eight
$ MA=`ifconfig en0 | grep ether | sed "s|:||g" | cut -f2 -d' '` ; echo $MA
and you will see something like:
002332123456
Now create the sparsebundle with the following command
$ hdiutil create -size 350g -fs HFS+J -volname "TM_$HN" $HN\_$MA.sparsebundle
and you will see something like:
created: /Users/sodium/eight_002332123456.sparsebundle
! keep in mind that eight,sodium & 002332123456 are variables and on your system you should see something different
! keep in mind that this newly created virtual filesystem is empty and the above command will not fill up your disk instantly :-)
3. Mount the destination (in my case Qbackup) via AFP click on finder and press ⌘+k (connect to server)
Apple TimeMachine with QNAP NAS v0.1.2 Page 2/4
4. Copy the sparsebundle file to the volume by typing the following in the Terminal screen: (replacing the variables eight_002332123456 with the
varibales of your own system)
$ rsync -avE eight_002332123456.sparsebundle /Volumes/Qbackup/
This will not take long as the created file is only about 60 Mbyte for a sparsebundle of 350 Gbyte. After some seconds and several lines with
information, you'll get the prompt back.
5. Tidy up your HDD using finder select and delete the local sparsebindle file or do it in the terminal session with (replacing
eight_002332123456.sparsebundle with your local saprsebundle name)
$ rm -rf eight_002332123456.sparsebundle
6. Enable non-TimeCapsule disks for TimeMachine.
$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
7. Open the System Preferences application again and enable TimeMachine and click on change disk select Qbackup.
While your are waiting fro the first backup, do the following: (if you have enabled spotlight (apple default is enable)
prevent spotlight from indexing the "TM_eight" share, while doing the backup (this would speedup things)
Goto Spotlight's privacy panel and add (+)“TM_eight” like this:
Apple TimeMachine with QNAP NAS v0.1.2 Page 3/4
8. Sit back, relax for several hours! while the first backup is being made.
! Time Machine will automatically mount the sparsebundle file directly (during backups you'll see “TM_eight”mounted)
Done!
Restore in case of total disk failure (you should test this at least once, until step 4)
1. Boot from the installer DVD. Choose “Options…” to get the Utilities menu
2. Utilities > Disk Utility to partition the disk the way you like it
3. Utilities > Restore System from Backup… If your Time Machine backup set appears, then restore away. While there’s a button here to connect
to a remote disk, that option wasn’t clickable for me. So we’ll have to mount our network volume manually.
4. Utilities > Terminal Run this command to mount your backup volume manually (substitute your username, password, and so forth):
$ mkdir /Volumes/Qbackup
$ mount -t afp afp://username:password@hostname/Qbackup /Volumes/Qbackup
$ exit
5. Utilities > Restore System from Backup… and you should now be able to choose your Time Machine backups.
Note:
On the QNAP you should have the following permissions:
[/share/Qbackup] # ls -al
drwxrwxrwx 14 sodium everyone 4096 Apr 25 12:37 ./
drwxrwxrwx 17 admin administ 4096 Apr 25 09:03 ../
drwxr-xr-x 2 sodium everyone 4096 Apr 25 12:32 .AppleDB/
drwxrwxrwx 2 sodium everyone 4096 Apr 25 12:32 .AppleDesktop/
drwxrwxrwx 2 sodium everyone 4096 Apr 25 12:36 .AppleDouble/
-rw-rw-rw- 1 sodium everyone 16 Apr 25 12:34 :2e002332123456
-rw-rw-rw- 1 sodium everyone 6148 Apr 25 12:32 :2eDS_Store
drwxrwsrwx 4 sodium everyone 4096 Apr 25 12:36 eight_002332123456.sparsebundle
MacBook & OSX & TimeMachine & TimeCapsule are trademarks of Apple Inc., registered in the U.S. and other countries.
Apple TimeMachine with QNAP NAS v0.1.2 Page 4/4
No comments:
Post a Comment