Link to home
Start Free TrialLog in
Avatar of cllocc
cllocc

asked on

Moving WSUS and WSUS Database folder from one drive to another on Windows Server SMB 2k3

Our drive that currently houses the WSUS folder and the WSUS database folder is running out of space. Both folders are about 7 GB. I want to move these to a newly partitioned drive. I have been searching online and reading guides, and also read some instructions on EE.

I decided to go the easy route and just run the wsusutil command. I opened up cmd, navigated to C:\Program Files\Update Services\Tools and copied the following command: wsusutil movecontent contentpath logfile -skipcopy gotten from the following website: http://rajkatyal.blogspot.com/2008/01/how-to-move-wsus-content-to-different.html

I hit enter and ran the command. It seemed to go unusually fast and was done within seconds. I decided to check the new WSUS directory and I saw that it had no WSUS files in it. I checked the old WSUS directory and saw that it still contained all of the WSUS files. I checked the wsuslog that was created and saw that the skipcopy command seemed to have stopped the wsus directory from copying over...
I tried running the wsusutil command again and this time cmd reported Fatal error: new file location is the same as the old location.....

As i understand, the wsus now thinks it needs to look at the new location however the new location does not have any wsus files in it. I guess the skipcopy command stopped the files from being copied over.  

Any ideas on how to move the Wsus files over again in the new area?

Also, I have to deal with moving the WSUS database over as well, so any assistance on that issue would also be appreciated.
Avatar of cllocc
cllocc

ASKER

Im thinking if i ran the wsusutil command again with  -skipcopy, telling it to move the content back to the old location without copying, then wsus should at least see the old location again with all the WSUS files intact? please advise.
Avatar of Don
Why are you using "-skipcopy" ? this only makes WSUS point to the new location without copying the files over.

you can use xcopy or robocopy to move the content now

http://social.technet.microsoft.com/Forums/en/winserverwsus/thread/5ade8155-da1f-47ff-a37d-f2d0461cc376
I did a similar task not long ago.
EASIEST WAY I FOUND>.......
add new drives, partition and format.
stop WSUS
(Assume current data is on D: drive)
RoboCopy the D: Drive to the new Drive (Say E:)
When finished, change drive letter of D: drive to say Z:
Change E: to D:
Restart WSUS

No config changes needed AT ALL.
Avatar of cllocc

ASKER

So could i run the following command: ROBOCOPY E:\WSUS\ G:\WSUS  
to copy everything over?
ASKER CERTIFIED SOLUTION
Avatar of Don
Don
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cllocc

ASKER

Ok, so thats for the WSUS folder. I have another folder called Wsusdatabase which i would also like to move to the new location. How would I move this folder over?
IF the wsusdatabase folder is ALSO on the same drive as the wsus folder then just SHUTDOWN the mssql server services and then use ROBOCOPY to move the folder to the other drive in te same manner.

Of course, before you start all this you will have a backup of the machine?
SBS by default installs WSUS to the System drive, so neilsr's method will not work.
Avatar of cllocc

ASKER

ok, I will look into using MS SQL Server Management Studio Express to move the database folder. In the meantime, it seems like the WSUS folder copied over successfully to the new location. Can I delete the Wsus folder that is remaining in the old location?
Yes
Avatar of cllocc

ASKER

Thanks dstewartjr, I was able to delete WSUS folder successfully.

However, I'm having trouble moving the WSUS database over. I was able to download SQL Server management studio express and install it (it asked to restart but I skipped that since people are still working here). I was able to open the WSUS database and detach it following the instructions on the website. while detached I moved a copy over to the new G: drive. then as I began to attach the database, when I navigated to the G: drive and to the WSUSdatabase folder, it would not show the SUSDB.mdf file that was copied there (see screenshot) User generated image
 I tried to type it in by hand but when i clicked okay it defaulted to the old location in the E: drive.  User generated image

It doesn't seem to be finding the database in the new location...any suggestions?
It looks like in your second screenshot that it is pointed to the new location ready to attach
dbloc.JPG
Avatar of cllocc

ASKER

Right thats what I set it to, but if you look at the SUSDB details, it says in the messages column not found. Also in that same area, you can see that the current file path says e: when it should be g:
When I click Okay, it connects to the old path.
Avatar of cllocc

ASKER

Any other suggestions?
Did you first detach then move/copy to new location before trying to re-attach ?
Avatar of cllocc

ASKER

yes I was able to succesfully detach and copy over the database to the new drive. However, when I am trying to reattach the database, it is unable to find the database in the new location and keeps defaulting to the old location.
Avatar of cllocc

ASKER

Tried restarting the server. This time, when i tried detaching the database, and error reported that there were active connections and it was unable to detach. I did not have WSUS running on the machine. any suggestions?
Avatar of cllocc

ASKER

Was able to move databases per using ROBOCOPY / XCOPY command, which moved the database files including all security permissions. After that I was able to mount the databases.