New
#11
So here are the results of my testing:
I made a backup image of a Windows 10 installation that was in a 250GB partition. First when I restored the partition, I shrunk it by 1GB so the restored partition was 249GB is size. This was the result:
Expanding the partition back to 250GB did not change the fragmentation. Conclusion: the partition was defragged (file by file copy) when it was shrunk and restored.
Now, here are the results when I restored the partition without resizing it:
So....the behavior Bree posted is correct. Restoring the partition without resizing is a sector by sector restore, not file by file, and no defragging occurs. So if you want to defrag during your restore, you have to shrink the partition when you restore it - then you can expand the restored partition back to it's original size after the restore is complete.
Actually, I think the File by File copy statement is actually rather an oversimplification. The restore is still an intelligent sector restore afaik, but instead of just excluding pagefile etc, it intelligently moves sectors around to remove fragmentation. Ultimately, it comes to the same thing but is more subtle than the old "Ghost" style defrag by file copy and I expect it is faster. Conceptually thinking of it as file by file copying is easier but I think it is more subtle. Its a moot point anyway as these tests show the way to defrag on the fly, and it is obviously far more efficient than the standard defragging.
Windows 10 defrags (or trims if an SSD) automatically once a week anyway so it's basically a moot point but I thought this was a great discussion. The shrink trick is very cool, I'll have to try that the next time I need to do a restore.
So, do I shrink the partition before restoring or before backing it up via macrium?