{"id":49112,"date":"2023-03-25T13:57:13","date_gmt":"2023-03-25T09:57:13","guid":{"rendered":"https:\/\/www.msp360.com\/resources\/?p=49112"},"modified":"2024-08-14T11:54:48","modified_gmt":"2024-08-14T07:54:48","slug":"image-based-backup-restoration-how-to-recover-a-backup-to-a-disk-of-a-smaller-size","status":"publish","type":"post","link":"https:\/\/www.msp360.com\/resources\/blog\/image-based-backup-restoration-how-to-recover-a-backup-to-a-disk-of-a-smaller-size\/","title":{"rendered":"Image-Based Backup Restore: Recover a Backup to a Disk of a Smaller Size"},"content":{"rendered":"<p>Scheduled full-system backup is a must in the production environment. If something goes wrong with a system or your computer, you can restore the system to a working state on a working machine and get back to your tasks without downtime. Usually, the recovery process goes smoothly; you just deploy your old system on a destination computer and that\u2019s all. However, there are some use cases that require additional actions.<\/p>\n<p><!--more--><\/p>\n<p>One such use case is when you need to restore your system to a disk of a smaller size. For example, when you need to move from HDD to SSD, or your alternate computer has a smaller disk (one of our clients\u2019 situation). Below, our system administrator and solution architect explain how to solve this issue when creating an<a href=\"https:\/\/www.msp360.com\/solutions\/image-based-backup\/\"> image-based backup in MSP360 Managed Backup Service<\/a> on Windows OS. All the tools used are Windows built-ins.<\/p>\n<h2>Restoring an Image-Based Backup to a Smaller Disk<\/h2>\n<p>The data on disk is stored in sectors \u2013 the smallest chunks of data on a hard disk. Each file has many sector units assigned to it. These sectors are not located near each other; they can be scattered around the disk. This is called fragmentation, and it is fragmentation that makes it difficult to shrink a partition to the desired size during restore.<\/p>\n<p>It is also necessary to know that the <a href=\"https:\/\/www.msp360.com\/resources\/blog\/file-level-vs-image-level-backup\/\">image-based backup<\/a> plan in Managed Backup Service backs up data by keeping the information about the placement of sectors on the drive, as well as the start offset of disk partitions. Thus, the backup preserves the disk fragmentation as is, with all its inefficiency. If the disk that you\u2019re going to use for system recovery is smaller than the original one, there won\u2019t be enough space for your fragmented system. Here are some measures that will help you to shrink the system before backing it up.<\/p>\n<h3>Tip 1. Defragmentation<\/h3>\n<p>Defragmentation picks up the file\u2019s fragments and joins them all together, one by one. After it completes, the files in your computer\u2019s storage become sequences of data blocks, and all the blocks that relate to a single file are located near each other. When possible, defragmentation also stocks all the \u201cbusy\u201d blocks in a pile, dividing the disk into two parts: one that\u2019s busy with data and one that\u2019s free. Not only does this reduce the size of your system, but it also speeds up your computer. To run defragmentation, open the Start menu and type \u201cdefrag\u201d. Windows will show the appropriate option: Defragment and Optimize Drives.<\/p>\n<blockquote><p>Please note: defragmentation can change the placement of a lot of sectors, even the ones that are for non-fragmented files. In this case, the next block-level backup can grow in size.<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49128\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image8.png\" alt=\"Disk Defragmentation Tool\" width=\"701\" height=\"506\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image8.png 701w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image8-300x217.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image8-624x450.png 624w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image8-100x71.png 100w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><br \/>\nHowever, in most cases, defragmentation is not enough to shrink a volume (but it is worth doing it to start with anyway).<\/p>\n<h3>Tip 2. Disabling System Files<\/h3>\n<p>There are system files that can be placed anywhere on the system partition, even in the middle of it, regardless of the space used. These files might appear as an obstacle to system shrinking. If the system is working properly, system files can be <b>temporarily <\/b>disabled. After a successful shrink or restore job, they must be re-enabled. Here is a list of these files:<\/p>\n<ul>\n<li>Pagefile (pagefile.sys)<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49123\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image3.png\" alt=\"Pagefile (pagefile.sys)\" width=\"396\" height=\"523\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image3.png 396w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image3-227x300.png 227w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/p>\n<ul>\n<li>Hibernation (hiberfil.sys) (execute cmd command: powercfg \/h off)<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49122\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image2.png\" alt=\"Disabling Hibernation\" width=\"979\" height=\"512\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image2.png 979w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image2-300x157.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image2-768x402.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image2-624x326.png 624w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49127\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image7.png\" alt=\"Result of Turning Off Hibernation\" width=\"786\" height=\"593\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image7.png 786w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image7-300x226.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image7-768x579.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image7-624x471.png 624w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><\/p>\n<ul>\n<li>System protection (system restore points)<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49126\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image6.png\" alt=\"Disabling System Protection\" width=\"823\" height=\"468\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image6.png 823w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image6-300x171.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image6-768x437.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image6-624x355.png 624w\" sizes=\"auto, (max-width: 823px) 100vw, 823px\" \/><\/p>\n<p>If you are not sure whether it is worth concerning yourself with system files, you can try to shrink the system disk itself. If the desired size is achieved by performing shrink in a working system, there\u2019s no need to disable system files before running a full backup.<\/p>\n<blockquote><p>Please note: pagefile.sys is ignored during an image-based backup job; however, it can make it impossible to shrink the partition on a working system before performing a backup.<\/p><\/blockquote>\n<h3>Tip 3. Lowering Disk Volume<\/h3>\n<p>Before starting the image-based backup, shrink the system partition in the source system to the desired size (e.g., to a size that fits your SSD) with the Disk Management tool (open Start menu and type \u201cdisk\u201d ) and then perform a full backup. This version of the system will require less space so it will fit the smaller disk.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49125\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image5.png\" alt=\"Shrinking Volume in Disk Management\" width=\"754\" height=\"597\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image5.png 754w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image5-300x238.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image5-624x494.png 624w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/p>\n<h2>Deploying Your System<\/h2>\n<p id=\"last\">By following these tips, you\u2019ll get a system of the desired size. Now, all that is left to do is to create a bootable USB\/ISO in the Managed Backup Service agent. You can find the appropriate option on the Home panel.<\/p>\n<div id=\"slidebox\"><a class=\"close\">\u00a0<\/a><!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper hs-cta-deferred\" id=\"hs-cta-wrapper-aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6\" data-portal=\"5442029\" data-id=\"aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6\"><span class=\"hs-cta-node hs-cta-aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6\" id=\"hs-cta-aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/5442029\/aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/5442029\/aa07fdb8-7776-46a5-9fa0-ec6e93f0f0a6.png\" alt=\"CTA\"><\/a><\/span><\/span><!-- end HubSpot Call-to-Action Code --><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49121\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image1.png\" alt=\"Creating a Recovery Disk in MSP360 Managed Backup Service\" width=\"460\" height=\"557\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image1.png 460w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image1-248x300.png 248w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/p>\n<p>When you run the Restore Wizard using your USB or image of the system that you\u2019ve backed up, there will be a step to select the partitions to restore. Here, you will be able to check whether you have done everything right.<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49124\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image4.png\" alt=\"Checking Partition Size\" width=\"392\" height=\"192\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image4.png 392w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2021\/02\/image4-300x147.png 300w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><br \/>\nChecking SSD with the TRIM Feature<\/h3>\n<p>Windows 8.1 and Windows 10 can automatically determine the type of physical storage, and configure it appropriately. Still, it is better to double-check some settings to boost performance and avoid problems in the future.<\/p>\n<p>When a user deletes some data, it is not removed from the drive. Instead, the area of the SSD that contains this data is marked as non-used. This happens due to the way solid state drives read and write information. The TRIM command tells the SSD that specific areas contain data that is no longer needed and<span style=\"font-size: 1rem;\">\u00a0can be removed. The next time the computer is idle, the Active Garbage Collection process will delete the data.<\/span><\/p>\n<p>If an image backed up from an HDD drive was restored to an SSD drive, checking if the TRIM function is enabled can be very important, as keeping useless data lowers the performance. To launch a check, run the command prompt with administrator rights and execute the following command:<\/p>\n<pre>fsutil behavior query DisableDeleteNotify<\/pre>\n<p>&nbsp;<\/p>\n<p>If TRIM has been enabled for the drive, the output of the command should include the following line:<\/p>\n<pre>NTFS DisableDeleteNotify = 0 (Disabled)<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-50352\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-5.png\" alt=\"The TRIM Command Enabled\" width=\"885\" height=\"413\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-5.png 885w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-5-300x140.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-5-768x358.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-5-624x291.png 624w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/p>\n<p>If the result is 1, then enable TRIM on an SSD drive via the command below:<\/p>\n<pre>fsutil behavior set DisableDeleteNotify 0<\/pre>\n<p>&nbsp;<\/p>\n<p>In this case, the data that you remove from your SSD will be actually deleted at the next run of the Active Garbage Collection process.<\/p>\n<p>Using these tips, you can significantly reduce the size of your system, so that you\u2019ll be able to deploy it on a computer with a smaller disk. Do not forget that all the described actions should be performed before launching the image-based backup plan, otherwise they won\u2019t work. If you have any further questions, please contact our pre-sales team.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scheduled full-system backup is a must in the production environment. If something goes wrong with a system or your computer, you can restore the system to a working state on a working machine and get back to your tasks without downtime. Usually, the recovery process goes smoothly; you just deploy your old system on a [&hellip;]<\/p>\n","protected":false},"author":89,"featured_media":49120,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[886,878],"tags":[960],"class_list":["post-49112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup-and-dr-guides","category-msp-university","tag-image-based-backup-restoration-how-to-recover-a-backup-to-a-disk-of-a-smaller-size"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/49112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/users\/89"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/comments?post=49112"}],"version-history":[{"count":6,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/49112\/revisions"}],"predecessor-version":[{"id":58322,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/49112\/revisions\/58322"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media\/49120"}],"wp:attachment":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media?parent=49112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/categories?post=49112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/tags?post=49112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}