Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.system > #57704 > unrolled thread
| Started by | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| First post | 2014-03-07 15:16 +0000 |
| Last post | 2014-03-12 13:35 +0000 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.sys.mac.system
Forcing Time Machine to Use a Local Volume as a Network Volume Jolly Roger <jollyroger@pobox.com> - 2014-03-07 15:16 +0000
Re: Forcing Time Machine to Use a Local Volume as a Network Volume Bread <BreadWithSpam@Fractious.net> - 2014-03-11 09:11 -0700
Re: Forcing Time Machine to Use a Local Volume as a Network Volume Ted Lee <tmplee@gmail.com> - 2014-03-11 11:42 -0500
Re: Forcing Time Machine to Use a Local Volume as a Network Volume David Sankey <David.Sankey@stfc.ac.uk> - 2014-03-12 13:35 +0000
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2014-03-07 15:16 +0000 |
| Subject | Forcing Time Machine to Use a Local Volume as a Network Volume |
| Message-ID | <bnu65oFs3fgU4@mid.individual.net> |
Time machine uses a feature of the HFS+ filesystem that was introduced in Mac OS X 10.5 (Leopard) called _directory hard links_. Like file hard links, a directory that is hard linked to another directory is not actually a distinct directory, but is instead a pointer to the original directory. Time Machine uses these directory hard links to reduce duplication and save space by making references to entire directory trees whose contained files have not been modified. To properly copy or duplicate a Time Machine backup, these directory hard links must be preserved. Unfortunately, directory hard links are proprietary to Apple. Apple discourages their casual use by third party developers because, if used incorrectly, they could create recursive directory structures that would render a volume effectively useless. This introduces obstacles to anyone wishing to make copies of a Time Machine volume. Time Machine may be configured to back up to a local volume that is connected directly to a Mac (either internally, or externally with a Firewire or USB connection), where it creates a Backups.backupdb folder at the root of the volume, storing all of the backup data in the volume’s native file system using the previously mentioned directory hard links. Unfortunately, Time Machine will not back up to a local directory, but instead requires an entire volume be dedicated to backups. Further, Time Machine will utilize as much free space as possible on the volume. To prevent Time Machine from filling a disk, you could partition the disk to create multiple volumes, dedicating only one of the partitions to Time Machine backups. Yet you would still have no easy way to copy the backup data off the partition, due to the directory hard links. Time Machine may also be configured to back up to volume that exists on a remote Mac and is mounted locally as a shared network volume. In this configuration, Time Machine creates a sparse disk image bundle which contains its own internal file system where backup data is stored. Since the backup data (with directory hard links) is stored within a self-contained disk image, one can easily make a copy of the entire disk image without worrying about effecting the directory hard links contained within the disk image. For this reason, backing up to a shared volume could be preferable for those who don’t want to dedicate an entire volume to backups, or who want to be able to easily make file system level copies of the backup data for added security. So what if you want to prevent Time Machine from using all available free space on a _local_ volume and also back up to a _disk image_? This procedure shows you how to do that. You can make an AppleShare network connection to the same machine by adding an extra IP address to the local loopback interface as an alias. This allows you to treat any local directory or volume as if it were a remote shared network volume, so that Time Machine will create a sparse disk image bundle on it which can easily be copied. 1. Use the System Preferences > Sharing > File Sharing facility to create a shared folder on any local volume. This folder will hold your Time Machine backups. 2. From an administrative account, open a terminal window and enter this command to create a loopback alias to the 127.0.0.2 IP address: # sudo ifconfig lo0 alias 127.0.0.2/32 2. Verify the loopback alias was created by looking for the 127.0.0.2 address in lo0 interface section of the ifconfig output: # ifconfig lo0 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 options=3<RXCSUM,TXCSUM> inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.2 netmask 0xffffffff <-- nd6 options=1<PERFORMNUD> 3. Use the Finder Go > Connect To Server menu command to connect to the server: afp://127.0.0.2, and select and mount the shared folder you created. You should see the shared folder mounted as a shared volume icon on the desktop. 4. Use the System Preferences > Time Machine facility to add the mounted shared volume as a Time Machine backup destination. Once this is done you can eject the shared volume from the desktop. Time Machine will mount and eject the volume automatically when needed in the future. 5. To create the loopback alias address each time the machine is booted, create a Launch Daemon property list file at /Library/LaunchDaemons/my.domain.loopback.plist with this content: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>my.domain.loopback</string> <key>Disabled</key> <false/> <key>RunAtLoad</key> <true/> <key>ProgramArguments</key> <array> <string>/sbin/ifconfig</string> <string>lo0</string> <string>alias</string> <string>127.0.0.2/32</string> </array> </dict> </plist> Now Time Machine will happily back up to a sparse disk image bundle on the local shared folder or volume. I’ve been using this solution for a few months now, including successfully restoring several items from my backups, without any apparent issues. Disclaimer: This information is offered with no guarantee of support whatsoever (unless freely and unexpectedly given, purely out of the grace and excellent basic goodness-of-heart of said author, who makes absolutely no claims whatsoever to promise same). Nevertheless, and with all serious intentions of being a "fine person of some reasonable degree of earnestness, kind-hearted interest, human understanding and worthwhile character," said author would like to hear from you concerning your excellent or other adventures or misadventures with this information. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [next] | [standalone]
| From | Bread <BreadWithSpam@Fractious.net> |
|---|---|
| Date | 2014-03-11 09:11 -0700 |
| Message-ID | <lfncju$3i2$1@reader1.panix.com> |
| In reply to | #57704 |
On 2014-03-07 15:16:09 +0000, Jolly Roger said: > So what if you want to prevent Time Machine from using all available > free space on a _local_ volume and also back up to a _disk image_? This > procedure shows you how to do that. You can make an AppleShare network > connection to the same machine by adding an extra IP address to the > local loopback interface as an alias. This allows you to treat any local > directory or volume as if it were a remote shared network volume, so > that Time Machine will create a sparse disk image bundle on it which can > easily be copied. JR, that's an interesting idea that I hadn't seen anyone else mention before. On the Drobo support forum, there's this: <http://support.drobo.com/app/answers/detail/a_id/608/~/how-do-i-get-time-machine-to-work-on-lion-with-my-new-drobo-(das)%3F> which explains a different techinique for the same thing - setting up a disk image on the locally connected Drobo for use with Time Machine. I haven't tried either technique, though. I've been going the partition-the-drive route. And in fact, one of my external TM volumes, as of yesterday, appears to be hosed and Disk Utility says to "copy the files off and reformat." Hrmf. Since it's just one of several backups, I'll probably just wipe it and start from scratch. This is the first time that a local (non-disk-image) TM volume got hosed this way on me. I've had the TM volumes which I remotely mount up from my Airport Extreme get hosed a few times over the years.
[toc] | [prev] | [next] | [standalone]
| From | Ted Lee <tmplee@gmail.com> |
|---|---|
| Date | 2014-03-11 11:42 -0500 |
| Message-ID | <lfnedb$c55$1@dont-email.me> |
| In reply to | #57890 |
On 3/11/14, 11:11 AM, Bread wrote: > And in fact, one of my external TM volumes, as of yesterday, appears to > be hosed and Disk Utility says to "copy the files off and reformat." > Hrmf. Since it's just one of several backups, I'll probably just wipe > it and start from scratch. This is the first time that a local > (non-disk-image) TM volume got hosed this way on me. I've had the TM > volumes which I remotely mount up from my Airport Extreme get hosed a > few times over the years. I wonder why/how they get hosed. (I don't think its a hardware problem with my backup medium.) You'd think that would be one function that they've worked hard to get very reliable. I backup my stuff with TM to an external drive attached to another mac on my home network that's always running. Every now and then I get a "can't backup message" which I attribute to wifi connection problems and it always seems to recover from that. Except that once several months ago I did a "verify backups" operation, after I'd tried to restore a file and it wasn't going well, and got the bad news that the backup was unusable and would need to be reformatted. Every now and then I've done the verify op and things seem OK. I suppose I ought to get another drive and rotate backups, but I'm lazy. -- Ted
[toc] | [prev] | [next] | [standalone]
| From | David Sankey <David.Sankey@stfc.ac.uk> |
|---|---|
| Date | 2014-03-12 13:35 +0000 |
| Message-ID | <lfpnrg$vtd$1@dont-email.me> |
| In reply to | #57891 |
On 11/03/2014 16:42, Ted Lee wrote: > On 3/11/14, 11:11 AM, Bread wrote: >> And in fact, one of my external TM volumes, as of yesterday, appears to >> be hosed and Disk Utility says to "copy the files off and reformat." >> Hrmf. Since it's just one of several backups, I'll probably just wipe >> it and start from scratch. This is the first time that a local >> (non-disk-image) TM volume got hosed this way on me. I've had the TM >> volumes which I remotely mount up from my Airport Extreme get hosed a >> few times over the years. > > I wonder why/how they get hosed. (I don't think its a hardware problem > with my backup medium.) You'd think that would be one function that > they've worked hard to get very reliable. I backup my stuff with TM to > an external drive attached to another mac on my home network that's > always running. Every now and then I get a "can't backup message" which > I attribute to wifi connection problems and it always seems to recover > from that. Except that once several months ago I did a "verify backups" > operation, after I'd tried to restore a file and it wasn't going well, > and got the bad news that the backup was unusable and would need to be > reformatted. Every now and then I've done the verify op and things seem > OK. I suppose I ought to get another drive and rotate backups, but I'm > lazy. > I've now had local encrypted sparsebundle TM volumes on unencrypted disk become unusable twice in the past year (so originally with Mountain Lion, most recently with Mavericks, but set up with ML). Now trying encrypted disk with local TM to see if that fares better. Dave
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.mac.system
csiph-web