Tuesday, January 26, 2010

How to archive a Client PC Backup from Windows Home Server Backup

How to archive a Client PC Backup from Windows Home Server Backup: "



Fellow Windows Home Server MVP Olaf Engelke has written a brilliant article on how to archive a client PC backup from your Windows Home Server Backup.


Well done Olaf!


Here is the article:


Situation:


You want to clean up the console from not longer used computers, but you do not want to lose the last backup done from that machine. Or you want to preserve an important backup without the risk of losing it in case of a corrupted backup database in the future. Since Windows Home Server does not support archiving, you would either have to save the entire backup database or keep the unused computer forever in the console.


This FAQ describes an unsupported method to archive single volumes from a PCs backup using Microsoft imaging technologies used for corporate deployments. Be warned, that this requires some basic technical understanding of drive imaging and that misinterpreting information given here may have negative effects to your client PC. Also details may vary for the operating system used and for the version of Windows AIK. This FAQ has been tested on a Windows 7 Ultimate client PC with WAIK 3.0.


Prerequisites:


· A running Windows Home Server client PC.


· Windows Automated Installation Kit (Windows AIK), which can be downloaded from Microsoft. Select a version, which is compatible to the client PC on which you want to perform the task.


· Enough disk space on a local disk, an USB drive or a network share to store the archived volume(s).


· The freeware tool GImageX for more convenience.


· The capability to open the backup using the Windows Home Server Console.


Limitations:


· You can only save and restore one volume at time, so saving or restoring multiple volumes is a sequential process. Limitations for restoring to different hardware apply as with Windows Home Server – a restored operating system could fail to boot, if the HAL or the disk layout/needed controller drivers on the target computer are different.


· Without the freeware GImageX you will have to perform all tasks in the command line.


· There is not much consistency checking, so carefully check your selections before applying anything to the wrong target location.


· The Windows Home Server Console on the client must be able to mount the backup and the backup must be completely readable.


Archiving a volume:


1. Download and install Windows AIK on a client PC.


2. Download and extract GImageX.


3. From the folder C:\Program Files\Windows AIK\Tools find the tools for your client OS architecture (x86 or x64) and copy following files to the same folder, in which gimagex.exe is stored:


wimgapi.dll


wimmount.inf


wimmount.sys


WimMountInstall.exe


wimserv.exe


imagex.exe


4. Open GImageX by double click (no installation needed).


5. In the Windows Home Server Console open the wanted backup of a volume you want to archive.


6. In GImageX on the Capture tab click Source and select the mounted volume containing your backup (usually Z:).


7. For Destination enter a path and a file name. The extension of the file is .wim. Wim files are file based images, which offer the benefit against Windows Home Server, that you can restore them also to smaller than the original volumes.


8. Assign a name to the image in the Name field and add a Description for the image file.


9. Select the wanted Compression rate (recommended: Maximum).


10. The other fields and checkboxes are not of high interest for the intended purpose.


11. Click Create to start the creation of the image file.


12. If you want to attach a second backup (i.e. another volume of the same PC) to that wim file, you can do this by clicking Append instead of Create.


Command line example:


If you like to use the command line for creating / appending the image, you can do this by opening the Deployment Tools Command Prompt from Start menu and entering the following commands (adjust them to your configuration):


imagex /capture Z: d:\test\whsbackupxp.wim “XP Workstation Drive C: 01/2010”


Optional to append another mounted backup (assuming again Z: as drive letter):


imagex /append Z: d:\test\whsbackupxp.wim “XP Workstation Drive D: 01/2010”


Hint: If you archive multiple PCs into one image by appending, you will often find, that the image file does not increase that much. This is the result of single instance storage, which stores only one copy of duplicate files.


You can store the created wim file on a shared folder on the server, on the client PC or on external disks and delete the old PC from the console, after you did save all volumes you intend to keep and validate, that your archive works as intended.


Mounting a wim file:


In the most cases you do not want to restore a complete old PC, but only single files or folders. To do so:


1. Create an empty folder on your local disk and open the GImageX tool.


2. Select the Mount tab.


3. Declare the empty folder as Mount Point.


4. Select your wim file as Source. The file can be located on any volume or network share, to which you have access.


5. If you have only one image in your wim file, select image number 1, if you have multiple, you can get the number from the Select dialog (here you meet the name and description from the Capture screen again).


6. Select the check box Read and Write, if you want to add, change or remove files from the wim file, otherwise leave it unchecked.


7. Click the Mount button. After a while (I got the feeling, using the command line tool is performing better) the mounting will be completed.


Command line example:


imagex /mount d:\test\whsbackupxp.wim 1 d:\mount


would mount the first image stored in the file whsbackupxp.wim from the location d:\test to the empty folder d:\mount. For mounting with Read and Write access you would use the parameter /mountrw. Windows 7 users can also use the command line tool dism.


Now you can open the mount point folder in Windows Explorer and access all files, which are stored in the image, dependent from the Read and Write selection copy, change, delete or even execute them.


Hint: Deletion of files and folders does not reduce the size of the image automatically. You would have to export the image to a new wim file to get a smaller image file after committing the deletion.


Unmounting the wim file:


After completing the operations you should unmount the wim file:


1. Close all open instances of the mounted image in Windows Explorer or command prompt.


2. On the Mount tab in the Unmount section select the mounted image(s) and click the Unmount button.


3. If you wish to save changes in an image mounted as Read and Write, select the Commit Changes checkbox.


Command line example:


imagex /unmount d:\mount


would unmount the image file from the mount point. The additional parameter /commit would be needed to finally write any changes made directly in the image.


Performing a full volume restore:


Bare metal restore is one of the powers Windows Home Server offers to end user. A wim file can also be used to perform this task:


1. Attach the disk, to which you want to restore the data, to the client PC as secondary drive or using an USB to IDE/SATA converter cable.


2. Create the volumes you need on this disk either by using disk management console or the diskpart command. If there are already volumes on the disk, it is recommended to format these volumes before starting a restore to them. The size must at least match the size of the total amount of data to restore.


3. Open GImageX and select your wim file as source.


4. As destination select the drive letter (or an empty folder), to which you want to restore all files from the volume.


Attention: Be carefully, because a wrong target selection can mess up the selected target volume. So it is not a good idea trying to apply the image to the current C: drive or another disk with data on it (with the exception of an empty folder as target).


5. Select the proper image from within the wim file to restore.


6. Restore further images to additional volumes on the disk, if needed.


Command line example:


imagex /apply d:\test\whsbackupxp.wim 2 f:\


would restore the second image stored in the file whsbackupxp.wim from the location d:\test to the root of a volume, which uses the drive letter f: in the currently running operating system.


If you want to boot a PC from the restored disk later (or try at least, if the hardware does not match the original configuration any more), set the volume active either in the Disk Management Console or with diskpart:


diskpart


select volume f: (use the drive letter assigned to the volume, which you want to make active)


active


Attention: Selecting the wrong partition here may render the current PC unbootable.


Hint: If you have a license of Windows 7 or Vista, you could also create a Windows PE based boot medium, copy the mentioned files to that medium and perform the restore from there directly on the target PC (assuming the drivers to access the disk are loaded (which is likely in Windows 7 PE), the volumes are created with diskpart or are still existing) and the wim file is accessible from a local drive or via mapped network share. For this you can use the cmd prompt in Windows PE, which can be opened with the shortcut Shift + F10.

No comments: