I wanted to take the time and write a migration guide for 2008 WSUS to 2016. This will involve using the Windows Internal Database on both WSUS Servers

Items needed

  1. SQL Server Management Studio 2008R2
    1. This will need to be installed on the 2008 WSUS Server
  2. SQL Server Management Studio 2012
    1. This will need to be installed on the 2016 WSUS Server

Migration Steps for 2008 WSUS

  1. Run SQL Management Studio AS ADMINISTRATOR
    1. For the Server Name use – \\.\pipe\mssql$microsoft##ssee\sql\query
    2. Click on Connect
    3. WSUS-SQL1
  2. Find the SUSDB and back it up. Select “Copy-only Backup” and add a location destination with enough space to store it then click OK
    1. WSUS-SQL2
    2. WSUS-SQL3
  3. Once the backup is finished copy it over to the new 2016 WSUS Server
  4. Copy the WSUS content from the 2008 server to the 2016 server. I did this by running a robocopy script from the 2008 server
    1. robocopy.exe E:\WSUS \\2016-wsus\E$\wsus *.* /E /B /XO /ZB /NP /log:c:\service\WSUSlog.txt /R:2 /W:5 /MT:64 /SEC /SECFIX /A-:SH
  5. Once that data is finished copying over you are done with the 2008 WSUS Server.

Migration Steps for 2016 WSUS

  1. Install SQL Server Management Studio 2012
  2. Install WSUS, and specify a content directory. Reboot (In my case E:\WSUS was the same on both servers)
  3. Run SQL Server Management Studio AS ADMINISTRATOR and for the Server Name use the following and click on connect
    1. \\.\pipe\mssql$microsoft##ssee\sql\query
    2. Note – If you cannot connect to the database start the “Windows Internal Database Service”.
  4. Detach the SUSDB from SQL, and restore the 2008 WSUS database that you backed up earlier.
    1. Find the SUSDB and right click on it, choose tasks, detach. Select the box under Drop Connections so that it is checked and hit OK.
    2. Right click on databases and choose Restore Databases. Select Device and browse to the location of “SUSDB-2008-Backup.bak”
      1. NOTE – If you get an error about no backup directory. Create a backup directory location like E:\MyBckDir . Then open the registry editor and browse to HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSWIN8.SQLWID\MSSQLSERVER . Then create a new String Value named BackupDirectory. Double click it and type the location of the backup directory you created. Once done it should allow you to restore a database.
        1. WSUS-SQL10
      2. WSUS-SQL4
    3. Click on Files in the left hand pane and select the box “Relocate all files to folder”
      1. WSUS-SQL5
    4. Click on Options in the left hand pane and select “Overwrite the existing database (WITH REPLACE)” . Then click OK
      1. WSUS-SQL6
    5. This may not complete all the way and you will get a few errors about schema verification failed, etc…. These are normal and we are going to address them. If the Restore Database Screen does not go away and shows error, just click on cancel and proceed.
    6. You will now see the SUSDB listed with (Recovery)
    7. Open a new command prompt choosing “Run as Administrator” and type the following
      1. cd “C:\Program Files\Update Services\Tools”
      2. Then run WSUSUtil.exe postinstall CONTENT_DIR=E:\WSUS
      3. WSUS-SQL7
    8. Once the command has finished running Open Powershell ISE as administrator. Then add the following lines and execute
      1. $updateserver = Get-WsusServer
        $config = $updateserver.GetConfiguration()
        $config.ServerId = [System.Guid]::NewGuid()
        $config.save()
      2. WSUS-SQL8
    9. Once that is done, switch back over to the elevated command prompt and run the following
      1. wsusutil postinstall
      2. WSUS-SQL9
    10. Now that this is done we should have restored access back to the database and open the WSUS console and see all the updates in place just like the old server.
    11. You can now decommission the 2008 WSUS server by uninstalling the roles. If you are getting rid of that server completely you can rename the new 2016 WSUS server to the old 2008 WSUS Servers name, or keep the new name and modify all of your Group Policies to point to the new WSUS Server.
      1. One important note – if you are not renaming the WSUS server to the same name as the 2008 WSUS then wait until right before close to update the Group Policies with the new WSUS name. Then instruct all of your users to reboot their computers before they leave for the day and leave them on for the night. The reason being is I have done this during business hours and the SVCHOST.exe process consumes a ton of resources on the desktops dragging them to a crawl. I believe this is because the desktops are re-indexing everything with the new 2016 WSUS Server.
Advertisements