How can I make my computer believe a disk image is a hardware disk?

I'm trying to do some research on TimeMachine right now. I don't want to purchase an external hard drive, just to learn about some software, and so I'd like to be able to tinker with the settings, by just creating a disk image...

But when I mount the disk image, TimeMachine doesn't see it as something it can back up to. So I'm wondering how I can lie to the system, and make it believe that the image is in fact real.

Thanks!


Aloha, counterbeing - I think we've worked together before!

I like the previous answer that creates a partition, but if that doesn't work for you, try this:

  1. Create your Disk Image (I've used a sparse bundle disk image).
  2. Mount the disk image
  3. From the command line, enter the following:

sudo tmutil setdestination /Volumes/{mounted-image-name}

• Start Time Machine manually within the menu bar via "Back Up Now"

If all goes well, you should then back up to the image. It will need to be large enough to contain all of your backup data - or Time Machine will likely refuse to use it.


I don't know of a way to do this, but if you have enough space left on your drive, you could add a small, temporary partition instead of using a disk image. This creates a real partition, and can be done without erasing current partitions by resizing them.

Note: If you are partitioning your boot drive, you may need to run Disk Utility from either your install disk or the recovery partition for some versions of OS X. At least 10.8.3 allows you to do it directly, though.

First, open Disk Utility from the /Applications/Utilities folder and click on your hard drive in the sidebar (the disk, not the partition). Then, go to the Partition tab and click the + button. Click the new partition and enter an appropriate size and optionally rename it using the fields on the right. Then press the Apply button and wait.

When you are done testing with your partition, you can remove it by clicking on it in the Partition tab and pressing the - button. Then, drag the bottom of the other partition down so that it fills the free space left behind and press Apply.