Use this article to move the contents of WSUS; usually needed for data migration or fixing a broken content store.
When the ..\UpdatesPackages folder of WSUS is moved without using the WsusUtil.exe tool e.g. when enabling SSL on WSUS, then you will experience issues in publishing 3rd party patches from Software Vulnerability Manager because the change of location for the update repository is not documented.
Steps To Reproduce
1) Use File Explorer to move the content of C:\Updates or the entire folder C:\Updates.
2) Publish a package from the Software Vulnerability Manager, and you get the error message:
Code: -2147467259 CreateDirectory failed.
The original location is C:\Updates and the folder contains 2 other folders 'C:\Updates\UpdateService Packages' and 'C:\Updates\WsusContent'.
The WsusUtil.exe will move the content of the Updates folder which includes the two subfolders, so if only one of the subfolders has been moved to a different location it is important to move it back to the original location before using the WsusUtil.exe to move both subfolders to the desired location.
To move the content of C:\Updates to D:\Updates, use the following command:
wsusutil movecontent D:\Updates D:\Updates\movelog.txt
In case, the intention was to move the two subfolders from C:\Updates to D:\Updates and all the data has already been moved/copied to the new location on D:\Updates or if you wish not to move the content, the procedure would be to use the following command:
wsusutil movecontent D:\Updates D:\Updates\movelog.txt -skipcopy
This command will register the new location in the WSUS configuration, but it will not copy the data from the original location.
If the content of C:\Updates was moved with File Explore, then use File Explorer to move it back to the original location.
Reference: https://technet.microsoft.com/en-us/library/cc720466(v=ws.10).aspx Please also note that 'wsusutil' takes some time to move the content and configure all of the permission correctly. The process can take to many hours - depending upon the size of updates and resources available to the server itself. We recommend to create the log and look for successful completion messages.
... View more
This article explains in detail how to remove the entries from the 'Software Vulnerability Manager Agent scan queue' to clear up disk space and for other reasons you might want that.
The SVM On-Prem solution uses a queue for handling incoming agent scans. Scans end up in this table before they are actually submitted to other tables in the database and thereby made visible in the SVM web interface. This database location can get congested and problems may result out of that.
In the SVM edition for Red Hat Enterprise 7, there is a service named scandaemon which will remove the entries when the entry status is 4, indicating that the scan result has been submitted successfully. It is sometimes necessary to delete old entries from this "queue" due to e.g. lack of disk space.
You can use the below queries to delete the information in the "queue" or identify an ID of an entry (row) from a time frame and delete the entries older than the specified time frame.
NOTE: In the below information where nsi_results/nsi_queue is mentioned the appropriate table name must be selected according to OS version, e.g. nsi_results or nsi_queue. First, find the relevant ca_xxxxx database (where xxxx is your customer ID)
show databases; use ca_xxxx;
To delete all entries (rows) in the queue:
#On RHEL 6 and RHEL 7 these may differ, use the right one for your setup Truncate Table nsi_result; Truncate Table nsi_queue;
To identify entry IDs within a certain time frame:
SELECT id, status_date FROM nsi_results/nsi_queue WHERE status_date > DATE_SUB(NOW(), INTERVAL 3 WEEK) ORDER BY ID asc LIMIT 10;
This will list the first 10 entry IDs and related scan dates which are 3 weeks old, the INTERVAL can be increased or decreased as needed
To delete all entries older than the selected timeframe from the above SELECT query:
DELETE FROM nsi_results/nsi_queue WHERE status_date < DATE_SUB(NOW(), INTERVAL 3 WEEK);
This will delete all entries older than 3 weeks, the INTERVAL can be increased or decreased as needed.
... View more