Cloning down from an image?

Diggs

Well-Known Member
Reaction score
3,575
Location
Wisconsin
I'm familiar with 4-5 imaging/cloning software programs but haven't found one that will clone down from an image. Meaning if the image is from a 1 TB drive it cannot be restored to anything smaller than a 1 TB drive yet most of these programs easily clone from a 1 TB drive (not image) down to a 250 GB drive with no problem. They just won't due it from an image. Since the first thing I usually do is grab a drive image before starting work on a machine I'd like the ability to image onto something smaller if I need to in the future (SSD, etc.).

What do you use successfully to clone a large image to a smaller drive?
 
I don't have a solution but wonder what would happen if instead of imaging a drive to an image file, you imaged it to VHD? Its size would be similar to that of an image file, I would expect, and maybe one of the programs that fails to downsize an image file will behave differently downsizing a VHD.

PS - I'm not talking about sector-to-sector images, which would not be smaller than a "normal" file image.
 
DDRescue will do this (kind of). You set your source (the big drive) and your destination (the smaller drive). You then tell it to do it's thing. The program will run, and error out when it gets to the end of the smaller destination.

This approach assumes lots of things (mainly that *everything* is inside the smaller subsection of the larger drive). I'm sure our professional data recovery veterans can attest that you might have parts of the file system outside of that section. I'd suggest resizing the partitions before you do the clone to prevent any funkiness if possible (but I've done it without resizing first, and it worked -- but I used GParted to resize the partitions after the clone before I booted the OS).

[Just to throw it out there, my personal daily driver is Ubuntu with LVM (logical volume management). I cloned it with DDRescue from a 500GB mechanical to a 256GB SSD. To this day, my OS thinks it's on a 500GB drive. Since linux is rather hardy with such things, my OS still boots and runs. In the Windows world, you might run into some funky things that will break.
 
Using ddrescue would be a very bad idea. At the very least, you'd be losing the backup copy of the Boot Sector. The MFT and INDX records tend to split and continue around the 50% point in a partition.
 
  • Like
Reactions: AML
Using ddrescue would be a very bad idea. At the very least, you'd be losing the backup copy of the Boot Sector. The MFT and INDX records tend to split and continue around the 50% point in a partition.

Would using a 3rd party tool (like GParted) to resize the partition before doing the clone resolve this issue?
 
I've never known ddrescue to be able to downsize reliably. Clonezilla is another that must have the same destination size (or larger).
 
I've never known ddrescue to be able to downsize reliably.
You're right, it's not an out of the box supported function. It's possible to do, but it's neither convenient nor save (as discussed above).

What's your use case with this? Will you need to do restore-down operations on every image you take, or once in a blue moon? You can in theory edit partitions inside of a DDRescue image, but I'd personally suggest (if this is an occasional task) restoring the image to the same size drive, resizing the partitions, and then cloning your edited drive to the target drive.

To dig into this a bit more, here's the technical difficulty (and why this isn't a pre-fab thing in a lot of cloning software). Remember that MFT that @lcoughey was talking about? It's a backup of part of your master file table. It lives in the middle of your partition, so in case your MFT dies, it can restore from backup.

A partition resize operation looks at the free space on your drive, and then moves any file fragments and the MFT (and other particulars) inside the specified area of the new smaller partition, and then updates the partition table with smaller values for the partition. When you're creating an image, the image software on some level specifies the location of the data, and ranges of sectors as free space. It's no easy task to calculate this on the fly from an image file that is larger than the destination to see if it will work (not to mention how file fragments complicate this, as moving them will require changes to the file system so they don't get lost).

I think a restore to a temp drive, a partition resize, and then a clone to the target drive is your best bet.
 
No, there is not two full copies of the MFT. The backup copy, which usually resides at the front of the partition only holds the location of a few key system files, such as $bitmap. The MFT records at the middle of the drive are actual single copies that will result in data loss, if they are lost or damaged.

Yes, tools that resize on the fly are okay, but basically, they aren't doing a sector by sector copy, rather, they are usually automatically creating a new partition and doing a file copy to the smaller partition, creating a new MFT during the process.

Edit: resizing a portion to a smaller space will require files that exist beyond the new limit to be moved into lower LBA locations within the new partition, MFT records rewritten and finally the MBR (GPT) and both BS copies modified to show the new partition size.
 
Reflect should do this, assuming of course the target drive capacity is greater than the amount of data in the source image. It usually just states that the last partition has been resized to fit. You can manually add/resize partitions too though.
 
Aomei was supposed to do this but turns out only with a drive not images. I don't need this feature often, but since I image just about everything I'd like the option to restore to a smaller drive rather than a restore to a big drive and then clone down when needed.
 
I was fairly sure I had done this on various occasions in Reflect but I've just double-checked to be sure ...


s4Vt0Xt.png
 
I use Reflect Workstation, Server and Server Plus, depending on the system. That screenshot was from a Server ed. installation but I'm pretty sure Workstation ed. (and even the free ed.) have that functionality. Reflect is a very good product, I can't recommend it highly enough. I've been using it for maybe 10 years and been a reseller for the last 3 or 4 years.
 
I use Reflect Workstation, Server and Server Plus, depending on the system. That screenshot was from a Server ed. installation but I'm pretty sure Workstation ed. (and even the free ed.) have that functionality. Reflect is a very good product, I can't recommend it highly enough. I've been using it for maybe 10 years and been a reseller for the last 3 or 4 years.

Macrium download servers are down right now... chuckles......
 
ha, looks like they were having a few problems. This is what happens when you get a mention on TN. I guess we overwhelmed their servers ;)

I think they may have just come back online. Wasn't working for me a few minutes ago but seems to be working again now.
 
I was fairly sure I had done this on various occasions in Reflect but I've just double-checked to be sure ...

It doesn't work that way for me. Once I ask for it to copy down the image I get a fail notice.

clone4.JPG
clone3.JPG
 
Last edited:
Back
Top