windows server 2012

How to backup WSUS database


The Software Update Point (SUP) role in System Center Configuration Manager is closely related and dependent on Windows Server Update Services (WSUS). WSUS database may be located in the Windows Internal Database (WID). In this article we are going to show you how to backup this database in Windows Server 2012 R2 environment.

To backup WSUS database you just need to complete 4 easy steps:

  1. Download and install SQL Server 2012 SP1 Feature Pack. It will give you an opportunity to use SQL command line
  2. Download and install ODBC driver for SQL Server 11
  3. Create and run Backup WSUSdb script
  4. Create a task in Windows Task Scheduler to run the SQL script

We are going to miss the first 2 steps, because they really easy. So let’s start from the 3 step.

At first we need to create BackupWSUSdb.sql file that contains two lines:

BACKUP DATABASE [SUSDB] TO DISK = N'f:\wsus_db_backup\WSUS_DB.BAK' WITH NOFORMAT, INIT, NAME = N'WSUSDB - Full Database Backup', SKIP, NOREWIND, NOUNLOAD,STATS = 10
 GO

F:\wsus_db_backup\WSUS_DB.BAK is the path to the backup file that you want to create (you can change the path and file name, it’s really up to you).

sqlcmd

Running SQL script

To run the script you should use sqlcmd.exe utility:

sqlcmd.exe -S np:\\.\pipe\MICROSOFT##WID\tsql\query -if:\WSUS_DB_Backup\backupWSUSdb.sql

Action to launch the script

It’s quite trivial, just do everything like on next screenshot:

backup wsus properties

That’s all. The WSUS database backup is created.

You may also like:

Restore Windows 10 Registry from Backup using Comm... When Windows 10 have some problems with registry files (in case of corruption, accidental deletion etc.), the system offers a simple way to restore th...
Config Remote Desktop Easy Print on Server 2012 R2 TS Easy Print technology was first introduced in Windows Server 2008 as an alternative to the use of traditional printing subsystem on Remote Desktop ...
How to create and configure DAG in Exchange 2013 Hello guys! In this article we are going to show you how to create and configure database availability group (DAG). DAG allows you to provide fault to...
Guide to SQL Server Transaction Log Backup In case you use Microsoft SQL Server you might heard about the Simple and Full database recovery models. Probably you also know that a Simple recovery...
Active Directory Database File Compaction and Defr... Active Directory is a non-relational database and its size increasing over time, the database takes more and more disk space. If you remove the object...

Add Your Comment