Showing posts with label Backup Recovery. Show all posts
Showing posts with label Backup Recovery. Show all posts

Wednesday, May 4, 2011

SCCM / SMS Backup Report

To know what sites haven't backed up within a given date range (a day and a half since last backup), and those that have never backed up (never reported a backup).

Groovy stuff, not so easy to determine though, or so it would seem, unless you fall back entirely onto the Status Message sub-system.

When a SMS2003 or ConfigMgr backup completes, a Status Message is produced by the SMS_SITE_BACKUP component and processed by the Site server. As you probably know, Status Messages replicate up the hierarchy, so the Central Site server will know all Status Messages being "sent up".

I've had this code running for a few days, it seems to work a charm.

There is one thing that can get in the way though, customised Status Filter Rules. If you have them, you understand them (unless you've inherited in which case GIYF), and know that they can block Status Messages from being processed or delivered to the Parent Site server (drop all informational for example, as the last rule in the rule set, yes some folks do this!).

The T-SQL to bring back the Status Messages, and to render a list of machines that do not fit the logic (no backup reported, ever) is here:

SELECT vsite.ServerName AS Servername, vsite.SiteCode, MAX(stat.Time) AS LastTime

FROM vStatusMessages AS stat LEFT OUTER JOIN

StatusMessageInsStrs AS ins ON ins.RecordID = stat.RecordID LEFT OUTER JOIN

StatusMessageAttributes AS att1 ON att1.RecordID = stat.RecordID LEFT OUTER JOIN

v_Site AS vsite ON vsite.ServerName = stat.MachineName

WHERE (vsite.Type = 2) AND (stat.Component = 'SMS_SITE_BACKUP') AND (stat.MessageID = 5035)

GROUP BY vsite.ServerName, vsite.SiteCode

HAVING (MAX(stat.Time) < DATEADD(day, - 1.5 , GETDATE()))

ORDER BY LastTime

select 'Sites that have never reported a backup (Investigate any server that is listed)'

select servername from v_site where type = 2 and servername not in

(SELECT vsite.ServerName AS Servername

FROM vStatusMessages AS stat LEFT OUTER JOIN

StatusMessageInsStrs AS ins ON ins.RecordID = stat.RecordID LEFT OUTER JOIN

StatusMessageAttributes AS att1 ON att1.RecordID = stat.RecordID LEFT OUTER JOIN

v_Site AS vsite ON vsite.ServerName = stat.MachineName

WHERE (vsite.Type = 2) AND (stat.Component = 'SMS_SITE_BACKUP') AND (stat.MessageID = 5035)

GROUP BY vsite.ServerName, vsite.SiteCode

HAVING (MAX(stat.Time) >= DATEADD(day, - 1.5 , GETDATE())))

 

 

The Query itself is entirely harmless, in that it doesn't UPDATE or DELETE, but you should be aware it can put a load on your DB instance while running. Nothing to big to worry about, unless you are seriously underspec'd hardware-wise.

And finally, be aware that as long as Status Filter rules are not inhibiting the delivery of the Status Message from down-level sites up the hierarchy, and that Sites in your hierarchy are communicating with their Parent's correctly, then you should be OK to rely on this report. I would suggest having some more reports configured to check for any sites that haven't reported in within the last 24hrs (indicative of some kind of failure taking place) and also to look at using dedicated Monitoring tools such as OpMgr to monitor Site servers and Site systems health using the Management Pack.

Monday, May 17, 2010

Decommission or Deleting a Secondary Site from SCCM Console

Decommission or Deleting a Secondary Site from SCCM Console

1) Log on to the primary for the secondary site. Right click the secondary site and select delete
clip_image002

2) On the welcome page click next
clip_image004

3) Choose the option to delete or uninstall site
Delete this site

Select this option to delete the secondary site. Deleting a secondary site will delete all information about the site and its resources from the site database at its parent site, but it will leave the secondary site component files installed on the secondary site server computer.Important

When Configuration Manager 2007 sites are deleted, the deleted site information is only deleted from the deleted site's direct parent site. Site deletion information is not propagated up the hierarchy to grandparent sites. In order to delete the site from the site database at sites above the deleted site's direct parent site, the hierarchy maintenance tool (Preinst.exe) must be run on every primary site above the deleted site's parent primary site using the command Preinst /delsite. For more information about the hierarchy maintenance tool, see Hierarchy Maintenance Tool (Preinst.exe).

Uninstall this site

Select this option to uninstall the secondary site. Uninstalling a secondary site will uninstall the secondary site component from the secondary site server computer, and then delete all information about the site and its resources from the site database at its parent site.
clip_image006

Click finish to complete wizard.

Restore Procedure’s for Primary Sites

Restore Procedure’s for Primary Sites

1. To start the Site Repair Wizard from the Configuration Manager console:
Navigate to System Center Configuration Manager \ Site Database \ Site Management \ <site name>.

2. Right click <site name> and click Repair Site.

Note: The Site Repair Wizard can only be started from the Configuration Manager console installed on the site server to be repaired. The option to start the Site Repair Wizard is not available on remote Configuration Manager console installations.

Important: If the Local drives on site server and SQL Server destination option has been selected for the backup destination in the Backup ConfigMgr Site Server maintenance task, the site database backup files must be manually copied to the same location as the site data backup files before continuing.

3. On the Backup File Location page, click Browse to open the Browse for Folder dialog box, and browse to the location of the most recent site backup snapshot files (the backup destination specified in the Backup ConfigMgr Site Server maintenance task) and click OK to close the Browse for Folder dialog box.
Note: If the purpose of the site repair is to only recover lost site settings and the site database does not need to be restored, you can enable the Do not restore database option.

4. On the Progress page, review the steps the Site Repair Wizard takes to begin the repair process to ensure that they have completed successfully and click Next.

5. On the Parent Site Settings page, review the parent site settings to ensure that they have not changed since the site was last backed up.

6. On the Verify Site Hierarchy page, verify that the displayed site hierarchy information to be restored from backup is correct. If parent site, child site, or any site address information has changed since the last backup snapshot was created. You can view the site and site sender address properties information stored in the backup snapshot by clicking Properties. If child site was attached to, or detached from, the site to be recovered after the last backup snapshot was created, you can click Add to add the site to the repair information or Remove to remove the site from the site repair information. For new or deleted site sender addresses, you can click New or Delete in Addresses for selected site

7. (Optional). On the Reference Connection page, select a site that was active and accessible to the site to be recovered from the time the last backup snapshot was created and the time the Site Repair Wizard was started. The reference site will be used to recover any objects created at the primary site after the site was last backed up. For example, if a new collection was created at the site to be repaired after it was last backed up, the new collection can be recovered from the child reference site selected in Recover data from reference site.

8. On the Reference Site Data Recovery page, review the steps the Site Repair Wizard takes to recover reference site data to ensure they have completed successfully and click Next.

9. On the Object Pad page, specify and approximate number of Collections, Packages, and Advertisements that were created at this site since it was last backed up. This is to ensure that future collections, advertisements and collections created at the site after it is repaired do not contain duplicate IDs to those previously created. If there is non-zero data displayed in Collections, Packages, and Advertisements, it is based on the data recovered from the reference site.

10. On the Package Recovery page, you can verify that software distribution source files are accessible to the site server and that the local distribution point is up to date. To ensure that the local distribution point is updated with the most recent version of software distribution source files for packages, you can click Update the distribution point on this site server. If a distribution point is not installed locally on the site server to be repaired, this step can be skipped by clicking Skip package verification.

11. On the Summary page, review the summary of site repair actions that you have selected. To change any of the displayed settings, click Back. To begin the repair process, click Next.
Important: After clicking Next on the Summary page, the site repair process will begin, you cannot go back to previous steps.

12. On the Final Progress page, review the steps the Site Repair Wizard takes to repair the site to ensure they have completed successfully and click Next.

13. On the Finish page, review the information displayed and click Close to finish the site repair process and close the Site Repair Wizard.