How should I do if I were you ? Backup and restore a Microsoft Deployment distribution share...
Cliquer ici pour une version en Français
Hey, here is my first contribution to the world !
This kind of post can be considered to something like a "how to" if I should have to work in a production environment with a specific purpose in mind.
This one will be very low level as it concerns the way to backup and restore what has been done through the Deployment Workbench of the brand new Microsoft Deployment Tool Kit (which I'll call MDT). You may have to recover a failed server or migrate your hard stuff to a new server, so here is what I found to easily backup and restore the distribution share and alternate deployment points you set up...
This will let you recover your solution quickly without too many manual operations.
I'm considering you're aware of what is MDT and how to work with. If not, you can refer to the link Desktop Deployment where you will find a link to download the MDT.
So... let's move forward and let's back up.
The first thing you have to do is to have a full file back up of the folder trees (I assume you created your distribution share in E:\MDT\Distribution and at least alternate deployment point as E:\MDT\Deploy). You can perform this task by using NTBackup or by copying those folder trees to a network share (in this case, you can use robocopy to save the file permissions and count on its reliability).
Then backup also the file Deploy.xml located in the "Control" folder in the Microsoft Deployment installation directory (by default it is C:\Program Files\Microsoft Deployment\Control).
If you are using the MDT database on Microsoft SQL Server, you should know how to back up it (if not, let see the procedure below). If you're using Microsoft SQL Server 2005 Express, you may use the Advanced Edition as the SQL Management Studio Express is included in it and let you easily perform a SQL database back up through a MMC console. Link to download the Microsoft SQL Server 2005 Express Edition with Advanced Services Service Pack 2.
The full procedure is :
- Run “SQL Server Management Studio Express” from Start | Programs | Microsoft SQL Server 2005
- Expand “Databases” and right-click your database
- Select the action “Tasks | Back Up…”
- Select :
- Backup type : Full
- Back up to : select a convenient path to store your backup (by providing also a filename : deploy.bak for example)
- Click on “OK
So now, restore all this stuf.
Install all Microsoft Deployment requirements
Restore the backup of the distribution share (“Distribution” in my example) and alternate deployment points' folders if needed to the disk of the new server
-> be sure to restore the files to a disk volume with the same drive letter and with the same path as it was on the source server
-> if you didn't backup the file permissions, re-apply them
-> recreate the shares for the distribution share and alternate deployment points (do not forget the share permissions as well)Restore the MDT database :
- Run “SQL Server Management Studio Express” from Start | Programs | Microsoft SQL Server 2005
- Expand “Databases” and right-click your database
- Select the action “Restore Database…”
- Specify :
- To database : provide the name of your target database
- From device : select the file deploy.bak you created during the backup
-> do not forget to select the selected filename - In the “Option” panel, verify that the target paths to the MDF (database itself) and LDF (database log) are corrects
Install the Microsoft Deployment Toolkit
Restore the Deploy.xml to the Microsoft Deployment installation directory (.\Program Files\Microsoft Deployment Toolkit\Control)
Open regedit and create the following registry key :
HKLM\Software\Microsoft\Deployment 4
Name : Distribution_Dir
Type : REG_SZ
Value : Path to the “Distribution” folder (example : E:\MDT\Distribution\, the “\” at the end is important)Open the Deployment Workbench and verify that all configuration is ok
That's it...
Link to download the Microsoft SQL Server 2005 Express Edition with Advanced Services Service Pack 2.
Note that this procedure is provided "as is" with no warranty nor supportability engagement. It does not engage Microsoft at all.
Nevertheless if you consider this not clear, incomplete or inadequate, please let me know !