How can I do "Time Machine" from my Mac OS X 10.6.4 to my Window share drive? I'd also prefer to encrypt my image, so it's "safe" just in case :-)
In order to create a Time Machine backup to an unsupported drive (pretty much anything that's not formatted HFS+) you need to run the following Terminal command:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Your share will now show up as a valid Time Machine destination in the Time Machine Preference Pane.
Time Machine will then create a disk image on that drive that will act just like a HFS+ drive for Time Machines purposes (hard linking, etc.). One advantage of using a disk image over using the entire drive is that you can limit the size it will grow to of the disk image using Disk Utility.
Be sure to check Louis Gerbarg's answer as well for why it's unsupported and you have to jump through a hoop to enable it.
There are various hacks to setup a diskimage on the share, which I am sure other people will describe in depth. Having said that DO NOT USE SMB TO STORE TIME MACHINE BACKUPS.
Guaranteeing writes on a disk image backed over a network store is complicated. Apple had reliability issues with Time Machine over AFP for years, and they controlled the entire stack. In order to guarantee write ordering and write stability (which are necessary in order for Time Machine to work in the presence of intermittent networking, such as walking out or range of the base station or putting the machine to sleep midbackup and waking it up out of range) Time Machine depends on features specific to AFP (For those interested, those are published as part of the Time Machine Network Server Requirements).
I did not test this solution, but looks someone did a little write up for this: OSX Timemachine and Samba/Windows share « Hupio’s Weblog
Yes with caveats
- Create a sparsebundle disk image per these instructions Windows NTFS Linux or other disk for Time Machine Backups and move it to your network file share
- Optional: Add the disk image as a login item so that it is mounted when you log-in
- 🍎 Menu -> System Preferences -> Users and Groups -> Login Items -> '+' button -> Navigate to the network drive and select the sparsebundle
- Or, add a cron job for a 2 line script:
osascript -e 'mount volume "smb://username@servername/sharename"'
hdiutil attach /Volumes/servernameandorsharename
(The advantage of osascript over bash is that osascript will remember your password)
- If your disk doesn't appear as an option in Time Machine preferences use the line from Chealion's answer:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1.
- And/Or use the commandline:
tmutil setdestination /Volumes/Volumenameonceitsbeenmounted
- And/Or use the commandline:
- Buy a copy of Alsoft DiskWarrior.
The problem is, as @louis-gerbarg says, backup to a network share is a risk unless your server, router, network and client are all very reliable. The symptom is then that the disk no longer mounts and your backup no longer runs.
I have been doing Time Machine backup to network share for 10 years and I reckon on a disk repair every other month. I have sometimes got through a year with
chkdskalone repairing errors but that left me with a trail of old broken backup images.
That said, the better perspective is:
- If you don't have 3 copies, you aren't serious about backup. Therefore:
- You should also have everything duplicated to somewhere that's at least fire-and-theft-isolated from your machine. Some combination of iDrive, OneDrive, Github, Syncthing, Cubbit, diy Azure storage, for instance.
- That leaves me still using TimeMachine primarily for the convenience of recent versions: 'darn get me the version from yesterday'. It's a great interface. So now I'm less concerned about losing last year's TM backups so long as I can start a new TM backup tonight.
Unfortunately, I don't believe you can. From the Time Machine help docs:
Time Machine can’t back up to an external disk connected to an AirPort Extreme, or to an iPod, iDisk, or disk formatted for Windows.
EDIT: Ignore this answer. As mentioned in comments, Apple's own documentation is out of date.