Time Machine & Time Capsule support on your LinkStation
- 1 Purpose and Requirements
- 2 Enabling "Unsupported" Time Machine volumes in OS X
- 3 Creating and Using NAS-based Time Capsule volumes
- 3.1 Creating an Image for Your Time Capsule
- 3.2 Resizing the Image
- 3.3 Choosing Between AFP, SMB and NFS
- 3.4 Setting Up Shares/Exports and Bonjour/Avahi
- 3.5 Initial Copy with cp -r (optional)
- 3.6 Setting Backup
- 3.7 Redundancy
- 3.8 Self-Destruct Issues
- 4 Restoring from Time Capsule/Time Machine
- 5 Limitations and Problems
- 6 References
Purpose and Requirements
Automatic Backups & Restore Capability
A nice feature of Leopard/Snow Leopard is Time Machine, which when coupled with a Time Capsule, gives Mac users a nice automated system for efficient, incremented backups of either selected user data, or the entire system. This can all be done either wired or wirelessly for MacBooks*, AirBooks, or any box running 10.5-10.6.
Also, one can restore a system from a Time Machine image, even picking the date of the backup to serve as the snapshot. These two capabilities make this a useful and desirable solution for backup.
- a Mac running either Leopard or Snow Leopard
- any NAS device running a full-fledge Linux distro, such as foonas or Debian
- lots of storage space on the NAS's hard drive, preferably a single partition of about 1TB or greater
- (optional) a USB drive of equal capacity, attached to the NAS, for redundancy
- a network, preferably with a gigabit backbone and 802.11n wireless capabilities
Enabling "Unsupported" Time Machine volumes in OS X
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Creating and Using NAS-based Time Capsule volumes
Creating an Image for Your Time Capsule
You will need to locally create a New Blank Image that:
- has a special filename format that identifies it to Time Machine
- 100MB (you will want a larger image for backups, but it is easiest to create it small/tiny and then resize it later)
- Mac OS Extended-Journaled,
- no-partition-map, and is a
- sparse bundle disk image
The filename format that Time Machine looks for is:
For instance, if I had a MacPro with an ethernet address of 00:a1:b2:c3:d4:e5, then I would use (and Time Machine would require)
as the filename for its backup image.
A note/word of caution regarding the name of your Time Machine image: using a hostname that contains a space seems to cause problems. Therefore, if your current hostname is "John Smith's SuperMac", you may want to simplify that to "JohnSmithsSuperMac" or "johnsmithssupermac".
Resizing the Image
Choosing Between AFP, SMB and NFS
Making Avahi Advertise & Display Correctly
If you want your Mac's Finder to recognize and display the Time Capsule correctly, then after installing avahi-daemon on your Linux-based Time Capsule, create a special services file for it.
Add these contents to it, and save it.
<?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">TimeCapsule %h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=TimeCapsule</txt-record> </service> </service-group>
Initial Copy with cp -r (optional)
Restoring from Time Capsule/Time Machine
As mentioned before, this is only a good option if you have been careful enough to:
- maintain integrity of your backup data/sparsebundle files, and
- chosen AFP/Netatalk as the filesharing protocol.
The basic idea is to boot from the Leopard/SnowLeopard Install DVD, and then open a terminal and use a few commands to mount the share so that Time Machine can access it.
1. Boot up your Mac that you want to restore a Time Machine image to, and have a partition suitably prepared for it.
2. In a terminal window execute the following commands:
mkdir /Volumes/TimeMachine mount -t afp afp://username:password@hostname/ShareName /Volumes/TimeMachine
where username, password, hostname (or its IP), and ShareName are all replaced by your values. Remember that ShareName is case sensitive.
3. Open up Time Machine.app and the backups should be accessible. Restore as one normally would with Time Machine.